If your phone is network locked, then flashing a new ROM will not unlock it, as it is the IMEI that is network locked, not the firmware on the phone.
I got my phone from Vodafone UK and unlocked it the next day using a code from www.unlockunit.com
. Cost about $25. I did not have to root / flash the phone, as I simply put in a SIM card from a network other than the one my phone is locked to and the phone asked me for an unlock code.
I have no idea if ATT firmware will stop working once you unlock your phone. but I can confirm that the Vodafone UK firmware on my phone is still working fine.
Hope this helps. If so, please hit thanks button