The Thai Embassy in Paris mentions for eligible countries : "Must reside in the countries for at least 21 consecutive days, except those who have just traveled out of Thailand"...without specifying any resident status.
And further down on the page but written in French : "The traveler must spend at least 21 days prior to travel in eligible countries (one exception: the traveler who has spent less than 21 days in eligible countries but had been in Thailand immediately before)"
http://www.thaiembassy.fr/fr/voyagecovid/