Of course. It’s in the Qur’an:
“It is not for the Prophet and those who have believed to ask forgiveness for the polytheists, even if they were relatives, after it has become clear to them that they are companions of Hellfire.” (Qur’an 9:113)
“There has already been for you an excellent pattern in Abraham and those with him, when they said to their people, ‘Indeed, we are disassociated from you and from whatever you worship other than Allah. We have denied you, and there has appeared between us and you animosity and hatred forever until you believe in Allah alone’ except for the saying of Abraham to his father, ‘I will surely ask forgiveness for you, but I have not for you anything against Allah. Our Lord, upon You we have relied, and to You we have returned, and to You is the destination.” (Qur’an 60:4)
This means that Abraham is an “excellent pattern,” someone to be imitated, when he says that there is “between us and you animosity and hatred forever until you believe in Allah alone,” but Abraham is not an excellent pattern, and not to be imitated, when he says he will pray that Allah forgive them.
“Praying for non-Muslims eternal forgiveness forbidden, Saudi cleric on Sridevi’s death,” Dunya News, March 3, 2018:
(Web Desk) – Saudi cleric Sheikh Dr Al-Ghamidi has asserted on Saturday in a talk concerning death of Sridevi, a Bollywood legend, that to pray for eternal forgiveness of a non-Muslim is not permitted in Islam, alarabia.net reported.
The cleric said that to seek forgiveness for a non-Muslim and pray for blessings upon her is forbidden in Islam.
Allah Almighty has forbidden even Prophet Muhammad (PBUH) from praying for a non-Muslim after the death, the cleric added. However, he said that there is a difference between praying for eternal heavens for a non-Muslim and praying to the Almighty to have mercy on him/her.
He said that Islam does not forbid praying for the latter….