"But only the word" (Numbers 22:35). But if you wish to reveal a word that I told you not to say, know that you will speak that very word against your will. And "efes" ("only") is nothing but a term of consuming, as it is said, "for the money is gone (efes)" (Genesis 47:15). "And Balaam went with the princes of Balak" (Numbers 22:35). Come and see the hatred of that wicked man: all the warnings the Holy One, blessed be He, gave him, and the angel commanded him that he had no permission to go — even so, he thought to bribe the Holy One, blessed be He, with his sacrifices, so that He would let him curse.
Balaam Warned That Only God's Word Will Leave His Mouth
Midrash Aggadah, Numbers 22:35
ואפס את הדבר. אבל אם אתה תחפוץ לגלות דבר שאמרתי לך שלא תאמרנו, הוי יודע שאותו תדבר בעל כרחך, ואין אפס אלא לשון כלוי, שנאמר כי אפס כסף (בראשית מז טו): וילך בלעם עם שרי בלק. בוא וראה שנאתו של אותו רשע, כל אזהרות עשה לו הקב"ה, והמלאך הצוהו שלא יהא לו רשות לילך, אף על פי כן חשב לשחד להקב"ה בקרבנותיו כדי שיניחנו לקלל: