This is a well proven Hadith in Sunni sources, mentioned in Bukhari , Muslim, Trimdhi, Nissaie and other books. We would like to understand this hadith in the light of verses of Holy Quran.
Quran reports about Moses and Aaron. Surah Taaha (20: 25-36)” Moses said, "Lord, grant me courage, Make my task easy, and my tongue fluent, so that they may understand me. Appoint a deputy (for me) from my own family, Aaron, my brother, Strengthen my back by him, And associate him (with me) in my affair, That we may glorify You much, And remember You much, You are Well Aware of our situation." [Allah] said, "You have been granted your request, O Moses.”
We have mentioned the verses of Quran. So we can understand the position of Aaron to Moses. Now we can easily understand this hadith "O Ali, You are to me as Aaron to Moses , the only difference is there is no Prophet after me."
We can also understand from the verses of Holy Quran that Allah(swt) appoints a deputy to His prophets. Not even the prophet himself or people appoint the deputy for the prophet.
English Translation
Sa'ad bin Abbi waqas narrated:
The Holy Prophet said to Ali;
“You are to me as Aaron to Moses, the only difference is there is no prophet after me.”