There are conflicted information in this forum. The contract free T-mobile 5s is not "unlocked" in US, it is supposed to be unlocked for overseas GSM. However, it is not clear whether you need to activate it on T-mobile first and wait for 40 days for unlock code to unlock it before you can use it overseas.
I contacted both Apple and T-mobile multiple times. None of them answered question with a clear answer.
The best way to confirm this is to purchase the 5s from the Apple Store. Remove the T-mobile SIM before you turn 5s on and replace the SIM with your international SIM. Turn it on and go through the initial setup to see if the iPhone is lock or not.
If it is locked, simply return to the Apple store with full refund in 30 days. Since Apple is not answering the question, why not try it yourself on their dime?