The eighth chapter of Proverbs is all about wisdom and understanding. It portrays Wisdom as saying that all who rule on earth reign and govern by her, by Wisdom. So all rulers on earth must be wise.
But the Bible mentions some rulers who were not wise. Nebuchadnezzar wasn’t a wise man, or he wouldn’t have tried to get all the wise men in Babylon killed. Saul did such a foolish thing that God decided he couldn’t be king anymore. Even Solomon wasn’t wise when he first became king.
Speaking of Solomon, he certainly didn’t seem to think all rulers were wise when he wrote Ecclesiastes. And he ought to be an expert on these things. Solomon doesn’t say it’s impossible to be a foolish old king, only that it’s not the best thing you can be. He contrasts wise people with rulers, which would make no sense if rulers were always wise themselves.
And then there’s a passage where he contrasts fools with the rich, which would generally include rulers, so he’s implying that rulers are wise. But he blames the positions they’re in on an error that he says rulers tend make, which doesn’t make rulers sound so wise.