Short answer: Yes, you can enter through Hong Kong and leave through Macau. Technically, the onward tickets requirement does not apply at Hong Kong given the travel plan in question, but you are not gaining much as the same requirement applies at Macau anyway.
While Hong Kong SAR and Macau SAR are part of China, the two regions operate separate immigration control from each other. Thus, in the view of immigration authorities, you are visiting two separate immigration regions:
- You are visiting Hong Kong for a week and then leaving for your next destination Macau.
- You are visiting Macau very briefly - arriving from Hong Kong (presumably not by plane) and departing to Seoul, South Korea by plane.
Thus, one is certainly allowed to enter through HK and leave through Macau, in the sense that they are actually, in order, entering Hong Kong, leaving Hong Kong, entering Macau, and leaving Macau, just like how a traveller would do in a multi-country itinerary.
Actually, I was going through this offical link https://www.immd.gov.hk/eng/services/visas/pre-arrival_registration_for_indian_nationals.html and got confused as it reads "...and hold onward or return tickets (unless in transit to the Mainland of China or the Macao Special Administrative Region), before entry to the HKSAR may be granted".
For the Hong Kong portion of your trip, as noted in the linked Pre-arrival Registration for Indian Nationals page, in addition to submitting the registration, you still need to satisfy officers you fulfil the general immigration requirements, including:
- Visitors are required to have adequate funds to cover the duration of their stay without working and, unless in transit to the Mainland of China or the Macao Special Administrative Region, to hold onward or return tickets. [...]
As Hong Kong does not really separate the concept of short stay and (non-sterile/direct) transit. One can technically argue your week-long trip in Hong Kong is "in transit" to Macau, though all it does is waive the requirement for onward tickets when entering Hong Kong.
Having that said, showing your flight tickets from Macau to Seoul to immigration officers in Hong Kong can only strengthen your case when seeking entry. In addition, immigration officers in Macau would expect to see the onward tickets as part of their immigration requirements anyway. Needless to say, please ensure you can also satisfy the other immigration requirements for Macau.