Ejido land is zoned for agriculture. Even if the land is no longer used for this purpose, once it's zoned as such, it remains agricultural land for life.
Mexican citizens can buy the land, but not without permission from the farming community. For foreigners to own the land, it must be privatized, transferred to a Mexican citizen, and then sold to a foreigner. The process is known to take a long time and isn't always successful. As a result, many foreigners stay away from ejido land.
A notary can tell you whether or not land is considered ejido land or not.