There are exceptions and exclusions to the mitzvah of sanctifying the kohanim sons of Ahron, and it pays for the kohen to be aware of those exclusions for his personal sake and to instruct those who are curious about the specifics of this mitzvah.
Kohen vs. Talmid Chacham
One popular exclusion is that the mitzvah of sanctifying the kohen is over-ridden by the obligation to respect a talmid-chacham who is more knowledgeable in torah-matters then the kohen (besides for the first aliyah where the kohen is given priority regardless of his torah-knowledge).
The exception of the talmid-chacham being given priority over the kohen is only in the event where the yisroel or levi talmid chacham is more knowledgeable then the kohen in torah-matters and law. In the event that they are equal, the kohen is given priority. 1)1
Discussing the long life of the amorah Rabbi Freida, Tosfoth points out that he would sanctify the kohen even when the said kohen was less knowledgeable in torah than he.
Kohen vs. elder?
It is common to hear “respect your elders” and, but what about when it comes down to choosing between an elder and the kohen, what is the halacha there?
The order of the posuk reads וַיִּכְתֹּב מֹשֶׁה אֶת הַתּוֹרָה הַזֹּאת וַיִּתְּנָהּ אֶל הַכֹּהֲנִים בְּנֵי לֵוִי הַנֹּשְׂאִים אֶת אֲרוֹן בְּרִית ה’ וְאֶל כָּל זִקְנֵי יִשְׂרָאֵל. Placing the kohanim sons of Levi before the elders of Israel. Similairy, the talmud protrays the order of the giving of torah laws to Ahron and his sons before the elders of Israel. 2)2
It is from this posuk that Rabbi Shimon derives that giving the kohen the first aliya is מן התורה. (Talmud Yerushalmi)
Rabbi Yochanon explains that although Yefeth was older then his brother Shem, Shem merited the kehuna due to that he would occupy himself with torah and not in worldly affairs3)3
References [ + ]