Thanks for this very thoughtful post.
It got me thinking...maybe the gap between verse 23 and the economic perspective is in the meaning of the phrase "sell it not." Andy can correct me on this, but usually when we sell something we give up our rights to it. So, according to this understanding if I sell you my car, I no longer can use it without your permission. But if I "sell" my students truth (along with alot of other things) in a lecture, I retain the right to use that truth again in the future. But if I sold the truth in the same sense that I sold you my car, I would not. Maybe this passage is warning us to not "sell" in the former sense, but not the later.
Another thing it might be saying is "don't put the "truth" up for sale to the highest bidder." That is, don't pretend something is true when it is not, just because it appears profitable to do so.
Which raises 2 questions.
1. As you say, if no one sells, (and it would be a violation of the Leviticus 19:18 to want others to do what we should not do ourselves) how can we buy? Perhaps "buy" here means "expend resources to require". Maybe its a recognition that "knowledge doesn't come cheap"?
2. Is "knowledge" a special kind of good - akin to a public good. Once I "sell" it to others, I can't be excluded from continuing to possess it (i.e. "know" it). Similarly, as you say, since our behavior is likely to reveal what we have learned, it is often difficult to exclude others from consuming it.
Perhaps this is why it seems to be under supplied!