If the foreigner rents it through an agency it’s legit
+++++++++
Thai definition on work:
performing any occupation or activity, whether with an employer or independently, that involves exercising physical energy or employing one’s knowledge or expertise
+++++++++++++++++.
So basically if the foreigner does anything in the way work is defined…you need a WP TIN and a visa