If you want to sell real estate while still retaining rights to visit a grave sited thereupon, the legal instrument is called an "easement". Sometimes the access grant is associated with ownership of another property (e.g. shared driveway), but it can just as easily be just to a sentimental goldfish aficionado.