No, I don’t think there is anyway to unlock a non-jailbroken phone. But I’m pretty sure it’s legal these days.
I jailbroke (jailbreaked?) my 3G using Pwnage tools, and I think UltraSn0w. Search for it (iPhone dev team), there’re are too many variables depending on what model, firmware and baseband you are using. There are also other unlock tools available, each for different situations. For me, it was pretty straightforward…
HOWEVER, do read up a lot before you do anything. If it’s a new phone running the latest iOS, then the baseband may be too high for the unlock to work, and jailbreaking it won’t help.
You can restore back to a non-jailbroken iOS by using a custom restore through iTunes. Be very careful about not doing a ‘normal’ restore from iTunes, as this may lead to the baseband problem above. I’d also read up about how to save your SHSH blobs through Cydia; I’ve not used them but I read that it was pretty important to have these.
Hope that helps