Yes.
Make sure you have them select "Device Only" on the AT&T page on their iPhones (the choices are New Customer, Existing Customer, and Device Only). Buy it outright, and put in the SIM card. If it doesn't immediately work, restore the phone through iTunes to receive new unlocking data. You'll get the congratulations message during the restore process and your phone should be unlocked.