The Messenger of Allah ﷺ said, "Whoever washes a deceased person should perform a full bath, and whoever carries the body should perform ablution."
حدثنا حجاج قال أخبرنا ابن أبي ذئب عن صالح مولى التوأمة
قال رسول الله ﷺ من غسل ميتا فليغتسل ومن حمله فليتوضأ
Its isnad is hasan, and it is found in Abu Dawud 1/12, in the Book of Purification, chapter on a man rubbing his hand with earth, and Ibn Majah likewise 1/128, no. 358.