Janaazah

Imaam preventing the janaazah of a certain person from being performed in the sehn of the Musjid

Q: Can the imam of a masjid prevent a janaza of a musalli being performed in the sehn of the masjid because the marhoom belonged to a different school of thought, for example the marhoom use to engage in bid’ah practices or the imam knows that the family member or appointed imam will be making a dua after the janaza namaaz?