Bilam not only is not an admirable individual, he is a truly base creature.
Nevertheless, the Midrash relates that Bilam’s level of prophecy paralleled that of Moses himself: “Never again has there arisen in Israel a prophet like Moses – in Israel there has not arisen, but among the nations there has arisen. And who is that? Bilam son of Beor” (Sifrei, Deuteronomy 357).
Bilam is the only prophet from among the nations of the world whose prophecy is included in the Torah.
The daily morning prayer service begins with a verse spoken by him – “How fair are your tents, O Jacob, your dwellings, O Israel” (Num. 24:5) – and his prophecy reached to the end of days, to the end of all generations.
Why is this so?
Apparently, in the case of nations of the world, prophecy is simply a matter of talent.
The prophet can be a philosophical genius but totally incompetent in everything else, just as a peerless mathematician can be clueless in other fields of study.
Among the nations, prophecy is a gift, a special quality that remains isolated from the rest of the prophet’s essence.
In the case of Israel’s holiness and spiritual essence, however, such a thing could not be; there cannot be an exalted personality whose exaltedness is sullied.
Rabbi Adin Steinsaltz