The current law in Mexico is that noncitizens are not allowed to buy property in the restricted zone, but they are allowed to buy property in the interior. The following two sites give details. Of course an expert in Mexican law should be consulted first. This appears to be subject to Mexican federal law.
Foreign Ownership of Property in Mexico has a copyright date of 2002-2017 so it seems to be up to date and discusses the arrangements required to get a long term lease within the restricted zone.
The Mexican Constitution regulates the ownership of land and declares
that ...within a zone of 100 kilometers from the border or 50
kilometers from the coast, a foreigner cannot acquire the direct
ownership of the land. These areas are known as Restricted or
Prohibited Zones. However, the latest Mexican Foreign Investment Law,
which was ratified on December 28, 1993, allows a foreigner or foreign
corporation to obtain the rights of ownership through a fiduciary
trust known as Fidelicomiso, the equivalent of a US beneficiary trust.
CAN FOREIGNERS REALLY OWN PROPERTY IN MEXICO?
Yes, Americans and other foreigners may obtain direct ownership of
property in the interior of Mexico. However, under Mexican law,
foreigners cannot own property outright within the restricted zone.
Instead, a real estate trust must be set up to hold title for the
foreigner. Since foreigners are not able to enter into contracts in
buy real estate, they must have a bank act on their behalf, much as a
trust is use to hold property for minors because they also can not
contract. The following is a brief outline of the law regarding such
trust, known as "fideicomisos", but potential buyers should always get
advice and have all real estate transactions overview by a licensed