Yes — differences over the details of prayer do not break the congregation, and the Salaf prayed behind one another despite disagreeing over qunūt, saying the basmalah aloud, raising the hands, and what breaks wuḍū'. The Prophet ﷺ said of the imams, 'They lead you in prayer; if they get it right, you and they have the reward, and if they err, you have the reward and the sin is theirs' (Bukhārī 694), so the follower's prayer is not ruined by the imam's ijtihād or mistake. When ʿUthmān was besieged and was asked about praying behind a leader of the fitnah, he answered, 'Prayer is among the best of deeds; when the people do good, do good along with them, and when they do bad, avoid their bad' (Bukhārī 695). The same applies to an imam of Ashʿarī, Māturīdī, or Atharī persuasion, or of a different madhhab: he is a Muslim of the qiblah and the prayer is valid. The genuine exception is an imam who has openly fallen into a clear nullifier of Islam — such as denying something necessarily known of the religion or mocking the religion — in which case one prays elsewhere, and the takfīr of any specific individual is left to qualified scholars, not to laypeople. Beyond that, disagreement over these details is no reason to split the ranks: 'Hold fast to the rope of Allah, all of you together, and do not be divided' (Qur'an 3:103).
Q&A · Sects & Comparative Belief
Can I pray behind an imam whose madhhab or creed differs from mine?
Evidence — the daleel
On deen2u
Informational, not a personal fatwa. Consult a qualified scholar for rulings on your situation.