if he is properly dispensed from his orders, he may live as a layman.
if he is not propelry dispenced from his orders, he is excommunicated.
in both cases it would be rare and unprecedented to allow him to exersize orders publically again, but of course preist forever and so at danger of another’s death he can give a sacrament to the dying person.