You need a connection to T-Mobile (whether it's cellular or WiFi Calling) in order to use texting from your T-Mobile phone number.
You can use things like WhatsApp or Google Voice to have another phone number you can text from -- but, it's not your T-Mobile number, and it can cause confusion to other folks wondering what number they should call you from.
I think smply's suggestion is really good for what you're looking to do. Have you given it a shot to see if that helps? Please let us know. Thanks!