No. You cannot.
As a non-Thai national you are not allowed to buy/own land in Thailand. If you are told otherwise, it is not true.
You can rent (lease) land for a maximum of 30 years. Yes, you can include a clause in the lease agreement that gives you an additional 30 year extension after the first 30 years. However, this clause is not binding and can be removed to your disadvantage. For example, if your landlord sells his property. The new owner will not be bound by this clause.
When you lease land, that land is legally yours. You are entered in the so-called Chanote (comparable to the German land register) and you do what you want (within the framework of the laws and local building regulations).
30 years is a long time. A lot can change. Perhaps also the attitude of the Thai government in this regard. Tourism is a very important economic factor in this country.
But nobody will be able to tell you exactly what will happen after 30 years. So assume that after 30 years the land (and the building(s) on it) will be returned to the landlord. Don't believe anyone who says otherwise.
You could start a Thai company. You own 49% of it. You need one (or more) Thai partner(s) who own 51% . With this company you can buy land (in the name of the company). 49% of it belongs to you and on paper the 51% Thai decide what happens.
But: we do not offer the land for sale. Even a Thai company or a Thai person can only lease the land for 30 years.