Can I gift an upgraded iPhone (once unlocked) to someone who is not in the same network?

I'm eligible for an upgrade on my at&t plan, but the intended recipient is with MetroPCS. I have no issues with my iPhone, and I was wondering if could upgrade, keep my old phone, and give my mother a new iPhone? This is assuming that I would be able to unlock the new iPhone and register it with metroPCS as a new phone.

If it's unlocked, anyone can use it.

AT&T and Metro both use GSM technology, which is good, but you have to work within the rules of both companies:

https://www.att.com/...eunlock/#/
https://www.metropcs.com/terms-conditions/phone-unlock-policy.html