ok. Well that must be a Belgian thing then because thousands of people get their tourist 60 day visa in Kuala Lumpur every year and they aren't permanent residents
you apply for the visa in the country you're in. If the embassy in the country uses the e-visa then you use that. If they don't then you attend in person. You don't have to be a citizen or permanent resident of that country. If you were trying to get the METV then that's when you need to be a resident or have pr. There are several reasons why you might have been denied.
Ranong is not so friendly .... used to be so nice, not anymore. You will need to show 20,000thb, onward ticket and proof of accommodation. This is for everyone. Anything missing and they will direct you to use one of the agents hanging around.