Rav Moshe Tzuriel Shlit”A has a beautiful piece on the Inyan of עשה לך רב or appointing a Rabbi for yourself. It is a wonderful article and should really be studied in its entirety (you can view it here). I just want to bring a portion of what he writes about a midrash that is often misinterpreted:
The Torah says (דברים יז, יא):
לא תסור מן הדבר אשר יגידו לך ימין ושמאל
You shall not deviate from that which they tell you to the left or to the right
Rashi bring the Sifri on this pasuk: (ספרי קנד)
אפילו אומר לך על ימין שהוא שמאל, ועל שמאל שהוא ימין, וכל שכן כשאומר לך על ימין ימין, ועל שמאל שמאל
Even if they say to you about right that it is left, and about left that it is right. How much more so when they say to you about right [that it is] right and about left [that it is] left.
This Rashi has led many people to make the mistake that we must follow a posek in halacha even if his position can be challenged from sources in the Gemara or in the early rishonim. This attitude is often called “Emunat Chachamim” or “Ase Lecha Rav.”
In truth, Rashi’s words (and the pasuk) only apply regarding the Sanhedrin and not a single rav in a particular generation. This is what the Ramban says on our pasuk:
שנשמע לבית דין הגדול העומד לפני השם במקום אשר יבחר בכל מה שיאמרו לנו בפירוש התורה
That we should listen to the high court which sits before Hashem in the place that He shall choose in all that they tell us in [their] interpretations of the Torah
This is also the pshat in the pasuk which says (Devarim 17:8) “and you shall rise and go up to the place that Hashem shall choose.” The Gemara on this pasuk says (ע"ז ח ע"ב) “This teaches that the location is key.” It is also important to note that the principle that Rashi brings does not appear in the Babylonian Talmud. What is amazing is that the Jerusalem Talmud actually teaches the exact opposite of the Sifri (הוריות א, סוף א):
יכול אם יאמרו לך על ימין שהוא שמאל ועל שמאל שהוא ימין, תשמע להם? ת"ל 'ללכת ימין ושמאל' (עד) שיאמרו לך על ימין שהוא ימין, ועל שמאל שהוא שמאל"
Could it be that if they tell you that right is left and left is right, that you will listen to them? [Thus the pasuk teaches:] “To go right and left,” [that is,] until they tell you that right is right and left is left.
Rav Yosef Nathanson Zt”l point out on this Yerushalmi (בהערות ציון וירושלים, שם) that this Gemara is against Rashi’s teaching. Also, the Rambam brings this Yerushalmi as halacha regarding whether someone knowledgeable in a topic is allowed to follow the majority of the Sanhedrin when he believes they are wrong (שגגות יג:ה):
הורו בית דין לאכול חלב הקיבה כולו, וידע אחד מן הקהל שטעו ושחלב הקיבה אסור, ואכל מפני הוראתן, שהיה עולה על דעתו שמצוה לשמוע מבית דין אע"פ שהם טועים, הרי זה האוכל חייב חטאת קבועה על אכילתו ואינו מצטרף למנין השוגגים על פיהם".
If the court instructed to eat all of the fat of the intestines, and someone from the congregation knew that they made a mistake and that the fat of the intestines is forbidden [but he still] ate based on their instruction since he thought that there is a mitzvah to listen to the court even when they are mistaken; then the one who ate is obligated to bring a sin-offering because of his eating and he does not join in the count of those who mistakenly sinned due to the instructions of the court.
Thus we have a psak halacha that is explicitly against the words of Rashi. The Rambam’s halacha is based on a Gemara in Sandedrin (90b) and thus both the Babli and Yerushalmi contradict the Sifri that Rashi brought and we are forced to say that Rashi was bringing the sifri as a Peirush, not as a psak. (This is what the Beit Yosef wrote on the matter in the name of the Rashba, או"ח סי' י' ד"ה ולענין הלכה)
There is another proof that can be brought from the Gemara against the method of those who actively follow Rashi. In Bava Batra (130b-131a) Rabba said to two of his students that when his halachic ruling comes before them and they have a disagreement with his words that they should come and ask him about it. But if a question arises after he has passed away, they should not rip his ruling since, maybe, if he were alive he would explain his position. However, they should not learn from that ruling regarding similar matters since “a judge only has what his eyes perceive.” It is explicit in his words that one should not rule like a Rav when there is a strong challenge to his opinion until they come and ask other sages to explain properly the position of the Rav. This is what the author of בני יששכר wrote in his book סור מרע ועשה טוב (ס"ק צ"ז ).