Yes, foreigners are allowed to own condominium units in Thailand as long as the foreign ownership in the building does not exceed 49% of the total units.
In addition, foreigners can own land and villa in Thailand through a leasehold agreement, which allows them to lease the land period of 30 years. This setup also welcomes the possibility of maintaining a contractual agreement for two subsequent renewals (30 years + renewal for 30 years + another renewal for 30 years, totaling a 90-years lease for the buyer).
Alternatively, foreigners can form a Thai company and purchase property in the company’s name, A foreigner who takes part of the company should not own more than 49% of the shares of the company.