Can I unlock an iphone and still develop apps for it?
According to this KB, Orange UK offers authorized unlock, so if the person that is giving you the phone is out of contract, he/she could be able to ask Orange to unlock it. This way you don't have to worry about the whole jailbreaking/unlocking business, if you only care about unlocking. Authorized unlock is like having never locked (factory unlocked) phone and doesn't affect/change the firmware, which is the issue that you are worrying about.