Ali Ibn Abi Taalib (RA) said: “I said to the Prophet (SAW), ‘Your old, misguided uncle has died. Who will bury him?’ He said: ‘Go and bury your father’ (that is, Ali may Allaah be pleased with him). He (Ali) said:
‘Go and bury him, then do not do anything until you come to me.’ So I went and buried him, & came to him with traces of dust and earth on me. Then he instructed me to take bath,
Saheeh: as-Saheehah, no. (161)
Commenting on the above hadeeth, Shaykh al-Albaanee (RH) said:
1 - It is permissible for a Muslim to attend to the burial of his disbelieving
"It is not (proper) for the Prophet and those who believe to ask Allaah’s Forgiveness for the Mushrikûn (polytheists, idolaters, pagans, disbelievers in the Oneness of Allaah) even though they be of kin...” [Suratul Tawbah 113].
In all of that, there is a lesson for those who are beguiled by their lineages & do not work for their Hereafter with their Lord. Allaah the Most Great spoke the truth when He said:
Source: Nudhum al-Faraa’id mimma fee Silsilati al-Albaanee min Fawaa’id, vol. 1, p. 481-482 by Abdul-Lateef bin Muhammad bin Ahmad bin Abee Rabee’ as copied.