Does Pinchas’s action itself prove that he had previously heard the relevant law from Moshe?
No: without Rashi’s explanation, the plain meaning of the verses allows for Pinchas acting out of zeal over the desecration of God’s name. It is also possible that he derived the law, or thought it could be derived, through the rules of Torah interpretation in a way unknown to us. The action alone therefore does not prove that Moshe had previously transmitted this law to him.
This answer was given to a specific person, not as a general rule.
Quote from the source«כן אפ"ל דלמד זה או דקס"ד שיש ללמוד זה במדות שהתורה נדרשת בהן (באופן שאין ידוע לנו)»
- Author
- כ״ק אדמו״ר שליט״א
- Source
- Hagahos HaRebbe — 5726-10 ש"פ פנחס תשכ"ו-1, p. 8
- Parsha
- Pinchas