OP, you need to check the phone is definitely unlocked before buying it. Or just buy a new (and unlocked) phone when you get to HK.
The UK (or at least Apple in the UK) seem to be making it harder to get your hands on unlocked iPhones. I was visiting the UK just as the iPhone 5 was released and I intended to get it on contract (my UK contract had just run out and financially it would cost me about the same to buy a new iPhone 5 and pay the UK contract over it's lifetime as it would to buy an unlocked iPhone 5 direct from Apple HK - except at the time it practically impossible to order one in HK).
However, talking to staff in various phone shops, notably Carphone Warehouse (who usually seem to know their stuff), I was told that with the iPhone 5 (in the UK at least), it locks to whatever SIM is first put in and this can't be changed even with the network provider's help. I don't know how true this as I rapidly lost interest at this point and got a free Galaxy S3 instead (and bought the iPhone 5 from Apple HK when the frenzy calmed down).
Of course with your friend's iPhone 4, it should be different as it's an older phone (unless they bought it recently...worth checking). My old UK iPhone 4 was unlocked by the network provider as soon as I asked (I was still in contract with O2 but working abroad and they had no issues unlocking it....although you will need to sync with iTunes if you keep swapping SIMs like I was when I was based in multiple countries - total pain in the arse).