The number needs to be prefaced with "+66". Generally, if you're given a foreign number with a leading zero, you drop the zero and prepend the country code (+66).
Be aware that T-Mobile's default international rates are ruinously high. To call Thailand without the Stateside International add-on is $3/min. If you don't make a lot of international calls it's much better to use a 3rd party long-distance service.
Manage your T-Mobile account