So what does the author of this particular commentary mean when they say "Balak was led by the Spirit to utter words concerning Israel."
Numbers 22 Preacher's Commentary
Invitation and Refusal
This chapter marks the beginning of the final part of the Book of Numbers, and from this point to the end of the book a miscellaneous collection of narratives, laws, and regulations are presented as having taken place or having been formulated during Israel’s encampment in the plains of Moab. The first of these narratives, and undoubtedly the most striking, concerns Balaam, a Gentile seer who was hired by Balak, king of Moab, to curse Israel and frustrate their onward march. Balak was led by the Spirit of God in a most remark able way to utter words concerning Israel and her future in the divine purposes which on any interpretation must rank as among the most striking ever uttered.