You need to seek the permission of concerned Revenue Officer having jurisdiction over the area in which the property is situated. Only after grant of permission of the concerned Revenue Officer, you can purchase the property of that person belonging to Scheduled Caste or Scheduled Tribe category.
If he has acquired the land on his own and is not sanctioned or procured in any way by government, the caste is not an issue the. If it is given by government then he can even get the nature of land to non-agricultural, then there will not be any issue in sale of property. Section 143 of the Uttar Pradesh Zamindari abolition and Land Reforms Act, which authorises the Assistant Collector or Sub Divisional Magistrate of the area to change the nature of a land from agricultural to residential. A survey of the land is conducted by the Lekhpal, who is a revenue official at the grassroot level, and he sends his report to the concerned Sub Divisional Magistrate with the endorsements of Tehsildar.
If the Sub Divisional Magistrate is satisfied from the report, then he passes a declaration under Section 143 to convert the land use. Otherwise, permission has to be taken from the Collector or Sub Divisional Magistrate for selling such land under Uttar Pradesh Revenue Code, 2006.
Reference: Section 143 of the Uttar Pradesh Zamindari abolition and Land Reforms Act and Uttar Pradesh Revenue Code, 2006