Strictly speaking, yes - in the same way as prostitution is illegal in Thailand.