There is no way to know if a corpse belongs to the priest's faction or not except by inspecting it visually.
If the corpse does belong to the priest's faction:
It is possible to tell whether the player is still online or not by typing "/who playername."
A response of "0 players found" indicates that the player has logged off (or is of the wrong faction).
A response giving the target's race, level, and class indicates that the player is still online and can be successfully resurrected.
Landing a resurrection on an offline or cross-faction player's corpses is indistinguishable from landing one on an online player's corpse who simply declines the resurrection. In both cases, the mana is wasted. If the dead character is flagged for PvP (also impossible to determine visually), then the priest will also become flagged.
Releasing
There are some common misconceptions involving Resurrection and releasing.
Players can be resurrected whether or not they release.
If the player has not released, the priest resurrecting can select the body and cast the spell.
If they have released, the priest must click the spell and mouse over the corpse since the corpse is not selectable.
There are reasons players should not release:
They will not see loot on mobs killed while dead.
They do not receive credit if a required quest event happens while dead.
They do not receive achievement credit for bosses killed while dead.
Players dead while a kill is made receive reputation but not experience (if eligible for experience).
Patch changes
Patch 1.6.0 (12-Jul-2005): Resurrection spells should now check range properly when used on targets that have released their spirit.