ICCtheWay is basically correct.
Carrying outside of your residence, should the wife have a permit, is completely forbidden although she could probably get away with taking it to a range. (There is no specific law I know of about that but in general, Thai cops are pretty reasonable).
That is not to say a lot of rich Thais do not carry. They do, usually in a small handbag. You can sometimes spot them in the banks. Completely illegal, but TiT (this is Thailand).
A lot depends on the county (Amphur) where you live. Upcountry, if you get friendly with the local top cop or village headman, things are pretty relaxed. Different story though in Bankgok, Pattaya, Changmai, etc.
Some areas, particularly where there are a lot of military, have many ranges where you can rent a handgun and shoot. This is other than the tourist type ranges which you can find in Pattaya and I suppose other cities.
I have a German friend that was told by the range manager at one it would be possible to for him to buy/register a gun as a sport shooter. Never heard that before, but I got the feeling it is possible. Again depends a lot what Province and Amphur you are in.
I’ve lived here for many years, and IMO carrying for protection outside is not necessary. There are no car-jackings and that kind of thing here.
If you buy a house and feel you need protection for it, 3-4 dogs are a much better choice. Shooting intruders is a very big deal, especially for a foreigner. Few thieves - even gangs - will take on a bunch of large dogs.
Last thing - there was a reference to Thaivisa.com on this thread. That forum has both the best and worst advice and info you can find on Thailand. Visa info from posters like Lopburi is invaluable - completely trustworthy, but there are a lot of a-holes with nothing better to do all day than post mindless responses to every subject under the sun, none of which they know anything about.
if you need heat around , befriend a cop