As salaam aalaikum,
Many Shias say that being an "imaam" is greater than being a prophet. They normally quote the following verse where Ibrahim(pbuh) prays to be an "imaam" after he became a prophet.
And [mention, O Muhammad], when Abraham was tried by his Lord with commands and he fulfilled them. [Allah] said, "Indeed, I will make you an imaan for the people." [Abraham] said, "And of my descendants?" [Allah] said, "My covenant does not include the wrongdoers." (Quran 2:124)
But in the following verse I feel that any Muslim believer can be an imaam.
And those who say, "Our Lord, grant us from among our wives and offspring comfort to our eyes and make us an imaam." (Quran 25:74)
From the above verse it seems that any muslim can make the dua of being an "imaam". Even Ibrahim(pbuh) was making a similar dua.
Furthermore, if we start reading the above verse in context of the 4-5 verses before, we notice it talks about repentance and turning a persons life around from sin and then making this dua to be an imaam.
This simply implies that ANY sinner who turns his life around can make dua to be an "imaam" as opposed to the concept of infallibility of imaams.
So how does one bring together the idea that an "imaam" is greater than a prophet when any Muslim can make dua to be a imaam ?
I would prefer shia view, but the others are welcome to chime in.