It could be iPhone problem. There are two separate methods of sending SMS using different technologies. I talk about standard GSM SMS (not iMessage).
1. Using old CS (circuit switched) GSM services.
2. Using PS (packet switched) GSM services.
It is possible that one network is not supporting both. Iphone switches to a different method when roaming and fails to revert to default when going back to home network. In other scenario iPhone switches back to home network for voice (CS service) and still roaming using data (PS service). There are reports in other thread that phone is continuing consuming all network data bundle instead of on-net bundle. It might be related to the same problem. Unfortunately there is no way to test above theory on iPhone, but you can try to disable LTE and see if any difference.
On other handsets you can chose service for sending&receiving SMS: CS, PS or both. Then if somebody with TM SIM want to take experiment, there is how to do it:
Step A: In TM coverage area use manual network selection and chose TM, then:
1. Change SMS settings to CS only and try to send SMS
2. Change SMS settings to PS only and try to send SMS
Step B: Outside TM coverage use manual network selection and chose MTN, then repeat 1&2 a/a.
Post here which method of sending SMS failed.