"And he sent messengers to Balaam son of Beor, to Pethor" (Numbers 22:5). "Pethor" is the name of his city. And some say that he was a money-changer, for the kings of the nations of the world would take counsel with him, like a money-changer to whom everyone rushes. And some say that in the beginning he was an interpreter of dreams; he turned to become a diviner; and he turned to the Holy Spirit.
Who Was Balaam at Pethor - Money-Changer, Dream-Reader, Prophet
Midrash Tanchuma Buber, Balak 5:1
וישלח מלאכים אל בלעם בן בעור פתורה (שם שם ה). שם עירו, ויש אומרים שולחני היה שהיו מלכי אומות העולם נמלכים בו, כשולחני שהכל מריצים לו, ויש אומרים בתחלה פותר חלומות היה, חזר להיות קוסם, וחזר לרוח הקודש.