YES - you can eat an avocado if the pit is growing a root. Most Hass avocados won't grow a root inside the avocado (its a long story -- it has to do with when they are harvested, how long they stay in cold storage, how they gas them to ripen right before they are taken to the grocery store, etc...)
My avocados often grow roots inside the avocado. That's because they are picked and shipped within 48 hours. They are still growing, living fruit when we ship them to you. Often, the varieties I'm shipping you are "closer" to the original avocado - (not as highly hybredized) - so they are more "natural" and prone to reproducing themselves. So they often grow roots. Not ALL my avocados do that (for example, the LAMB avocado is a grand daughter of the Hass -- so its even less prone to grow roots). But most of what we ship is "fore runners" of the Hass.
So, are they safe to eat? YES -- you can eat an avocado that is growing roots on the pit. Simply take the pit out (it may crack in half - that is normal too.) Cut out any root bits that get stuck in the avocado's flesh (they are tough and bitter - but not harmful). Then eat the avocado as usual.
If you want to grow a house plant - these pits with roots already growing are GREAT! They almost always grow into a plant.
Here is a video about how to grow that pit into a plant!
Best wishes! The Avocado Diva