A friend of mine who is a former Catholic said that he attended a funeral for a man who did not live a holy life, and the priest blessed the casket with holy water and claimed the man to be saved as if the holy water absolved him of his sins. I had never heard of this and am sure he misunderstood something the priest said in that rite upon blessing the casket that you could enlighten us on.
I think your friend misunderstood what the priest was doing. The Funeral Rites do begin with the blessing of the deceased with holy water. However this is not done to absolve the deceased of any sin, it is done to call to mind the baptism of the deceased. As the sprinkling of the casket takes place the priest says: “In the waters of baptism N. died with Christ and rose with him to new life. May he/she now share with Him eternal glory.”
The sprinkling rite is a reminder to us of the importance of the sacrament of baptism. Baptism configured us to Christ and made us co-heirs to the kingdom.