A stone or any similar marker may be placed on a grave.
It is mentioned in a narration that when Uthman ibn Maz’un (may Allah be pleased with him) was buried, the Prophet ﷺ commanded a man to bring a stone. When he was unable to lift it, the Prophet ﷺ himself helped him lift the stone, placed it at the head side of the deceased, and said:
أتـعـلـم بهـا قبـر أخـى وأدفن إليه من مات من أهلى
“I will recognise the grave of my brother by it, and I will bury near it those of my family who die.”
Imam Abu Dawud (may Allah have mercy on him) set up this chapter heading for this hadith: “Several dead persons may be gathered in one grave, and a marker may be set for the grave.”
Imam al-Bayhaqi (may Allah have mercy on him) set up this chapter heading: إعلام القبر بصخرة أو علامة ما كانت “Setting a marker for the grave with a stone or with any kind of sign.”
Shaykh al-Albani (may Allah have mercy on him) writes that this narration has two supporting narrations (shawahid) through which it becomes strong.