Completely unlocking your phone requires some serious hardware work inside the phone and takes some time. For these reasons among others it's pretty expensive. If something went wrong obviously your warranty wouldn't cover it as opening up the phone would void it, I believe.
So yes, it can be done, but I probably wouldn't recommend it. I think you can add some kind of international thing to your carrier's plan that will allow it to use towers in other countries. Since the iPhone is just a standard GSM phone it'll work on a lot of networks around the world. This obviously isn't free, but neither is unlocking your phone.