(Note: 'm ignoring jailbreaking and third party unlocking solutions in this response).
I you are in a country a roaming bucket where ATT offers a roaming bucket, you can get 120 megs for 30 bucks. You can then do VOIP Over 3g with Talkatone and a Google Voice account and make and receive calls/text messages for data only. If the 3g where you are visiting isn't strong enough, take a cheap unlocked GSM phone with you and use an app like MobileVOIP to trigger a callback to the foreign phone.
If ATT doesn't offer a data plan for your country or you are a major data user, look at iPhone Trip which has unlimited global data for $16 a day. Alternatively, take a MiFi and stick a local SIM in it. Lastly, leave the iPhone at home, buy a cheap Android world phone and use it.