It is permissible to pray behind anyone whose prayer is valid for himself.
Therefore, if the Imam of this masjid is a Muslim and doesn’t nullify his Islam, you can pray behind him but if he calls the saints and slaughter to their graves, this is major Shirk and you can’t pray behind him.