They could always do something new this year, but this is what they've done in the past. You can buy it and then put your foreign SIM in it and see if it activates.
Don't turn it on until your foreign SIM is in the phone, and connect to Apple Store WiFi. You should be good.
Even if not, take it home and hook it up to iTunes and do a restore with your foreign SIM in it. Worst case scenario, return to the Apple Store.
THIS ADVICE ONLY APPLIES TO iPHONES PURCHASED FROM THE APPLE STORE. If you buy it from a T-Mobile store or other retailer, it will be carrier locked to T-Mobile and will stay that way until you've used it for 40 days on T-Mobile.