You have to have a high friendship level with the ghost sim,I think good friend or higher,can just cheat slide up the relation bar with testingcheats after one interaction anyway with the ghost or by normal means talking and stuff.But after relation is high enough you can pick up the tombstone anytime as long as the ghost is not out wandering but that is pretty much all daylight hours anyway and night unless you see them out.Cannot pick it up till ghost goes back in.After picking p a tomb it goes in your inventory you can even go home and plop it in your yard or in your house.Until ressurected will act same as any other ghost but will haunt you and invade your home
And if you want any sim ghost anywhere in town to be a household member to marry,roomate whatever purpose use the philosopher stone LTR click on it hit bind ghost lists all ghosts in that world by name even ones in yards not just cemetery.
Example
So say you are in SV Lolita Goth will be on the bind ghost list same as Tragic Clown even though Lolita is buried in the Goth Yard.Once the ghost is bound they are part of your household you control them can do as you wish, fall in love, resurrect them make them get a job while your lazy sim watches TV all day whatever.