All perfect praise be to Allah, the Lord of the worlds. I testify that there is none worthy of worship except Allah and that Muhammad, sallallahu ʻalayhi wa sallam, is His slave and Messenger.
There is no harm in donating to the masjid where people practice religious innovations, as this does not prevent doing righteous deeds in that masjid. When the Kharijites seized Madeenah and Al-Masjid An-Nabawi and led the prayers therein, the Muslims were uncomfortable with praying behind them. ʻUthmaan, may Allah be pleased with him, however, urged the Muslims to perform the prayers at Al-Masjid An-Nabawi.
Al-Bukhaari allocated a chapter in his book Saheeh Al-Bukhaari entitled “Praying behind an imaam who is a victim of Fitnah or who practices Bid'ah.” He cited the following report in that chapter, “ʻUbaydullah ibn ʻAdiyy ibn Khiyaar narrated that he went to ʻUthmaan ibn ʻAffaan, may Allah be pleased with him, while he was besieged, and said to him, ‘You are the Commander of all Muslims, and you see what has befallen you! We are led in the prayer by an imaam of Fitnah (temptation/tribulation), and we are afraid of being sinful in following him.’ ʻUthmaan said, ‘Prayer is the best deed of what people do, so when the people do good, do good with them, and when they do evil, avoid their evil.’” [Al-Bukhaari]
Donating Mus-hafs to their masjid may be a means to soften their hearts and influence them, making it possible that they would accept advice. Such people should be given advice, and the truth should be made clear to them in a kind and gentle manner.
Allah knows best.