There are two things involved in the query.
1. Anyone can purchase the agricultural land as per laws prevailing in that state. In UP only agriculturists can only purchase the lands. At some places, only SC/ST can purchase the lands etc. There is no specific law that prohibits advocates alone from purchasing the land.
2. The use of land must be decided by the local authority. The agricultural land can not be converted to residential areas without specific permission for the use of land by the local authority.
3. The seller is supposed to provide the details of such approvals/sanctions through a notice board on site.
If you have doubts you can file RTI Application and can seek entire documents from the Local Authority (municipality/corporation/develpment authority) that permitted such outlay.