if you buy the phone from an Apple store or Apple online it is unlocked
on the Apple web page it now says
Unlocked and Contract free
for the Ymobile iPhone 6/6 plus
if you buy the phone from Tmobile it will be locked to them for 40 days
i have a 6 plus contract free Tmobile phone i bought from Apple online and am using it with ATT ( i have also tried it with Net10 and it worked)
do not activate the phone with the Tmobile sim that comes with it - that might lock it to Tmobile - if you have a nano sim from ATT just put that in before you activate the phone - or get a nano sim from ATT