Even a perfectively free market is not perfectly competitive. Perfectly competitive is a theoretical position used by economics, but it is theoretical. Perfectly competitive means profits are consistently zero, for example. If I have a nicer smile then the girl at the next shop and you prefer to shop at my shop, that's an "obstruction" preventing perfectly competitive markets.
The only markets that approach perfect competition in reality are commodity markets where, by definition, all products are perfectly equivalent.
This makes it even harder to get from "prices equal marginal costs if markets are perfectly competitive" to "prices prices should equal (or sometimes 'reflect') marginal costs." The implication is not just "remove government enforced barriers to competition" it is also "remove differences between you and competitors" and absurdities like "hire the same person as your competitors." Perfect competition requires perfect substitutes (competitors).
Imagine a "product" that uses necessarily non-uniform inputs: a seminar. One has Jimmy Carter speaking. The other has Mohammad Khatami. For this market to be perfectly competitive, the speakers (and the location and the coffee, etc) would have to be exactly equivalent.