related to this question
The halacha requires that on Pesach, when drinking at least the first 2 cups of wine or eating the matzah for the mitzvah, a person leans. The S"A (O"C 472:7) codifies it as
כל מי שצריך הסיבה אם אכל או שתה בלא הסיבה לא יצא וצריך לחזור לאכול ולשתות בהסיבה
But when sitting with certain people, including one's Rav Muvhak, there seems to be the possibility that, if told NOT to lean (or not given explicit permission TO lean -- אא"כ יתן לו רבו רשות), one does not lean.
My Daf Hayomi B'Halacha email wrote these two statements -- the first about leaning in the presence of one's father and the second, in the presence of a Rebbe
The Poskim disagree whether a son is permitted to lean in front of his father if the father insists that the son not do so. Some rule that the son may not lean in opposition to his father’s wishes, while others say that the father’s opinion is negated due to the fact that the average parent has no issue with his child leaning in front of him.
If the teacher permits the student to lean, the student must do so. The permission must be explicit and cannot be assumed.
But if the obligation to lean is on the level of halacha -- so much so that not leaning means one has not discharged his obligation, then being bound by the dictate of the father or the Rebbe would stop someone from being yotzei an obligation. The halacha yomit site writes
The Torah further states (Vayikra 19), “Each man shall revere his mother and father and you shall keep My Shabbat,” to teach us that if one’s father commands him to desecrate the Shabbat, the child may not obey his father, for the father is likewise obligated to honor Hashem who has commanded to observe the holy Shabbat. The same applies to any other Mitzvot in that if one’s parents command him to transgress any of the Torah’s commandments or that of the Sages, one may not obey them, for they are also obligated to keep these commandments.
Among other reasons, I can imagine that the dictate of divrei harav, divrei hatalmid, divrei mi shom'im might also apply.
How can there be any opinion that says that in the face of a particular element which is a sine qua non of proper fulfillment of a mitzvah, one can be forbidden to perform it by someone? Is it because of some difference between an aseh and a lo ta'aseh (or a shev v'al ta'aseh)? The answer here uses the language of ANY commandment.