It is not permissible for a Muslim to attend the funeral of a non-Muslim even if it is a relative, because attending a funeral is a right that one Muslim has over another and it is a kind of showing respect, honour and friendship that it is not permissible to show to a kaafir.
Abu Taalib, the paternal uncle of the Prophet (blessings and peace of Allah be upon him) died, and he instructed ‘Ali to bury him, but the Prophet (blessings and peace of Allah be upon him) did not attend his funeral or his burial, even though Abu Taalib’s support and defence of the Prophet (blessings and peace of Allah be upon him) was well known, and even though the Prophet (blessings and peace of Allah be upon him) felt a great deal of compassion and mercy towards him. Nothing stopped him from doing that except the fact that Abu Taalib died in a state of kufr. In fact the Prophet (blessings and peace of Allah be upon him) said: “I shall certainly pray for forgiveness for you so long as I am not forbidden to do so.” Then the words were revealed (interpretation of the meaning): “It is not (proper) for the Prophet and those who believe to ask Allaah’s forgiveness for the Mushrikoon, even though they be of kin, after it has become clear to them that they are the dwellers of the Fire (because they died in a state of disbelief)” [al-Tawbah 9:113] and: “Verily, you (O Muhammad) guide not whom you like,” [al-Qasas 28:56].
Abu Dawood (3214) and al-Nasaa’i (2006) narrated that ‘Ali said: I said to the Prophet (blessings and peace of Allah be upon him): Your paternal uncle, the misguided old man, has died. He said: “Go and bury your father.”
Although Islam promotes upholding ties of kinship and treating relatives kindly, it forbids close friendship between the believer and the disbeliever, so whatever is one of the forms of close friendship is forbidden, but whatever is kindness that is less than close friendship is permitted.
Imam Maalik (may Allah have mercy on him) said: “The Muslim should not wash his father if his father died as a disbeliever, or attend his funeral, or go down into his grave, unless he fears that he may be neglected, in which case he may bury him. End quote from al-Mudawwanah, 1/261
It says in Sharh Muntaha al-Iraadaat (1/374): The Muslim should not wash the kaafir because it is not allowed to form a strong bond with the kuffaar, and because that implies respecting him and purifying him; therefore it is not permissible, as is the case with offering the funeral prayer for him: “Do not shroud him or pray for him or attend his funeral,” because Allah says (interpretation of the meaning): “Take not as friends the people who incurred the Wrath of Allaah” [al-Mumtahanah 60:13].
It says in Fataawa al-Lajnah al-Daa’imah (9/10): What is the ruling on attending the funerals of disbelievers which has become a political custom and a tradition that all agreed upon?
Answer: If there are some kuffaar present who can bury their dead, then the Muslims should not bury them or join the kuffar or help them with burying them, or seek to be kind to them by attending their funerals, acting in accordance with political customs. Such matters are not known to have been done by the Messenger of Allah (blessings and peace of Allah be upon him) or by the Rightly Guided Caliphs. Rather Allah forbade His Messenger (blessings and peace of Allah be upon him) to stand over the grave of ‘Abd-Allah ibn Ubayy ibn Salool, and the reason given was that he was a disbeliever. Allah said (interpretation of the meaning): “And never (O Muhammad صلى الله عليه وسلم) pray (funeral prayer) for any of them (hypocrites) who dies, nor stand at his grave. Certainly they disbelieved in Allaah and His Messenger, and died while they were Faasiqoon (rebellious, — disobedient to Allaah and His Messenger صلى الله عليه وسلم)” [al-Tawbah 9:84]. But if there are none of them present who could bury him, then the Muslims should bury him as the Prophet (blessings and peace of Allah be upon him) did with the slain of Badr and his paternal uncle Abu Taalib when he died, and he said to ‘Ali: “Go and bury him.”
Standing Committee for Academic Research and Issuing Fatwas
‘Abd-Allah ibn Qa‘ood, ‘Abd-Allah ibn Ghadyaan, ‘Abd al-Razzaaq ‘Afeefi, ‘Abd al-‘Azeez ibn ‘Abd-Allah ibn Baaz. End quote.
Shaykh Muhammad ibn ‘Uthaymeen (may Allah have mercy on him) issued a similar fatwa in Fataawa Noor ‘ala al-Darb.
Attending the funeral of a kaafir in the church is much more serious than merely following the funeral procession, because this attendance implies listening to kufr and falsehood. This is something that is ignored by those who say that it is permissible to attend and stipulate that one should not participate in the rituals that take place there. Just sitting and watching and listening to kufr and falsehood is a wrong action that one should not do.
And Allah says (interpretation of the meaning):
“And it has already been revealed to you in the Book (this Qur’aan) that when you hear the Verses of Allaah being denied and mocked at, then sit not with them, until they engage in a talk other than that; (but if you stayed with them) certainly in that case you would be like them. Surely, Allaah will collect the hypocrites and disbelievers all together in Hell”
[Aal ‘Nisaa - 4:140].
Al-Jassaas said in Ahkaam al-Qur’aan (2/407): In this verse there is evidence that it is obligatory to denounce the evildoer’s action and that part of denouncing it is expressing disapproval, if it is not possible to remove it, as well as leaving the gathering where it is happening, until they stop doing that evil action. End quote.
Thus it is clear that attending the funeral rituals in the church is a great evil because of what it involves of listening to kufr and being present at innovation, whilst keeping quiet about it, in addition to the fact that attending the funeral is a sign of honour and friendship as mentioned above.
We ask Allah to help us and you to be steadfast and to guide us and help us all.
And Allah knows best.