On page 20 of Xanathar's Guide to Everything, the Grave Cleric's Keeper of Souls ability is detailed.
Starting at 17th level, you can seize a trace of vitality from a parting soul and use it to heal the living. When an enemy you can see dies within 60 feet of you, you or one creature of your choice that is within 60 feet of you regains hit points equal to the enemy’s number of Hit Dice
Emphasis mine. I was curious why it specifically outlines slain enemies instead of slain creatures. My initial thought was that without that specific wording you could in theory just keep resurrecting a slain ally by giving him hitpoints back to himself after he died, and that it was written that way to prevent only that case. I do not want to heal an ally with his own essence, but rather a different ally. Rules as written, my judgement says you cannot use a slain ally's essence. But, I want to know if the balance of the game would be significantly upset if one allowed a slain ally's (or non-enemy's) essence to be used on a different ally or oneself. Am I creating any loopholes that could bite me in the butt later? Does healing from any creature's death make the Grave Cleric too powerful or versatile?
Since enemies and allies aren't really defined, I want to be prepared in the event that myself or a player wants to test the bounds of the rules by considering a slain ally as an enemy for the purposes of healing another.