Sure, HK is a city as well as it’s a state, and you can besiege a city.
Doesn’t mean, under the hypothetical where someone went to war with China and HK allied with them, that that larger nation wouldn’t extract protections for HK from China as a concession, win or lose. It’d be an obvious “price of entry” for HK to participate in any such war. (Heck, I bet with the way things are going, if said ally was trying to recruit Taiwan to stand in rebellion, I bet Taiwan would also demand protections for HK as a concession, at the same time it was demanding protections for itself.)
Of course, in the mean time, the population of the city would probably have to evacuate to allied territory and only re-occupy the city after the war, lest they become an easy hostage for their allies.