Yes. Normally racial attributes aren't tied to race but Sunray checks for whether the target's race is classified as undead, which Lich is included as. Setting a creature's race to lich will indeed cause things like Sunray and Mace of Disruption to affect them. However, an allied cleric's Sunray cannot harm an allied or non-hostile lich.
Comments
Thanks for the headsup.