Only if the Tmobile cellphone had its simlock removed.
You can do this if you have finished your contract, and you can just call tmobile to unlock it, or you can find a service online that will send you an unlock upgrade, or you can punch in an unlock code that may be available for free..