A couple days ago a friend of mine took a 15 hour bus from Pattaya to Vientiane, Laos in order to exit the country in an attempt to re-enter for his third VISA exempt entry in a relatively short time and was denied the ability to EXIT Thailand at Nong Khai, into Laos after the Thai Immigration official saw his passport. He had a heart procedure scheduled in Thailand in a few weeks and he thought if he showed his medical paperwork they would allow him back into Thailand one last time. However, they sent him away and he had to return to Pattaya with two days left before he will be an overstay. What happens next I don't know. Just thought this info might be helpful.
TLDR : Answer Summary
A user shared an experience about their friend who was denied exit from Thailand to Laos when attempting to re-enter for a third visa-exempt entry, in light of a scheduled medical procedure in Thailand. Community members advised the friend to resolve the situation by either leaving before overstaying or applying for a proper visa, such as a tourist or medical visa. They suggested that the friend contact the hospital related to the medical procedure for potential visa assistance, highlighting recent stricter enforcement of visa rules.