I have heard the first part of that verse quoted a number of times. Perhaps I should have said misquoted. It is used in such a way as if to say, "God gives a vision to the minister/pastor, and only to him, and people need to follow him as he follows that vision." That has always bothered me. It has always sounded to me like a minister is trying to set himself up as having some sort of special access to God not available to the congregation. Not true. Peter said we are all priests before God; in fact, a "royal priesthood" (1 Peter 2:9). The only way Proverbs 29:18 can be interpreted that way is by taking it completely out of its context. If we look at the second clause in the verse--"he that keepeth the law, happy is he"--we have to ask what that has to do with a vision given by God to the minister. If we insist on the interpretation that means 'follow your pastor', then it makes no sense at all. So let's consider what it is really saying.
Most of the Proverbs are written in poetic form, specifically couplets (meaning two lines). Hebrew poetry is very different from English poetry. In the book of Proverbs, we have multiple examples of what is called antithetical parallelism. It's sort of like the same thought going in opposite directions. That is why the second part of many verses begin with the word "but", as if to say, "This is true, but think about this."
Let me give you an easy example from the same chapter. Verse 15 says that, "The rod and reproof give wisdom: but a child left to himself brings his mother to shame." We all get that. Proper training, guidance, and discipline result in a wise child who knows how to control his behavior and act appropriately. On the other hand, when the parent fails to provide those things, essentially leaving the child to his own devices, the result is a child whose misbehavior brings shame to his mother.
Now let's look again at verse 18. The same thought is in view in both statements. The key word is found in the second clause: law. What law? God's law. The person who obeys--keeps--God's law is happy. The error occurs when we think of vision as being something given by God to an individual, in much the same way Paul saw a vision of Jesus on the road to Damascus or Peter saw the vision of a sheet descending from heaven upon which were all sorts of unclean animals. But that isn't what the verse is talking about. Remember the idea of God's law. What the verse is saying is that when there is no clear understanding of God's law, His people suffer. We have just such a picture in Hosea 4:1-3: "The Lord brings a charge against the inhabitants of the land: There is no truth or mercy or knowledge of God in the land. By swearing and lying, killing and stealing and committing adultery, they break all restraint, with bloodshed upon bloodshed. Therefore the land will mourn; and everyone who dwells there will waste away..." Then we read the awful condemnation in verse 6: "My people are destroyed for lack of knowledge. Because you have rejected knowledge, I also will reject you...because you have forgotten the law of your God, I also will forget your children."
The man who preaches God's Word has a responsibility, and that is to preach/teach God's Word in such a way that his listeners understand what it is saying, in the same way we read about Ezra and several teaching priests as they spoke to the Jews following the rebuilding of the walls of Jerusalem: "So they read in the book in the law of God distinctly, and gave the sense, and caused them to understand the reading." When God's people are given a clear understanding of God's message, they prosper; but when that is lacking, they suffer.