How can Bil'am later (24:16) describe himself as "Yode'a Da'as Elyon" after admitting here that he did not even know when an angel was standing in front of him?
Rashi: His admission here negated his boastful claim 1 that he knew Hashem's Mind.
See Rashi there?
Why did Bil'am add the words "Im" and "be'Einecha"?
Rashi: His statement was aimed at attacking Hashem: If Hashem had granted him permission to go with Balak's dignitaries, why did He send an angel to negate it? 1 Be that as it may, if it is really bad in the Eyes of Hashem, he would have no choice but to retract.
Seforno: What he meant was that if it is bad in the eyes of the angel
Just as He did by the Akeidah, when, after instructing Avraham to sacrifice his son, He sent an angel to negate His initial instructions.