Yes, it's easy. Figure out a way to enter the other country, meet the requirements for the Thai visa you want to acquire, and then fly back into Thailand meeting the insurance and health requirements.
I'm not a travel advice service though. You can use this website
**********************************************************************************
**********
*****
*****
.htm
For the requirements to enter a country. You can look up the Thai embassy website for the country you're entering for the specific requirements for the visa.
The attached document is the requirements to enter Thailand.
If you meet those requirements, you'll be welcome back to Thailand.