yes but in reality it doesn't protect foreigners only Thai people. It is a very strange law where truth is no defence against defamation. The law literally makes saying the truth illegal. Thailand can't even stop serious criminal defamation and slander on Facebook which has become terrible in Thailand now.
most of Thailand is like this, yes I live and work where there are few foreigners. Most visitors never see the real Thailand, only a fake tourist version.