It says "at the moment of death". An undead being died some time before, and "the moment of death" is some time before "the present".
yes so you had to wear the ring before dying.
or be a caster before dying.
sorry for the mistake.(however the rule is only for spell slot counting and not for the transformation ritual)