What you're referring to is an old concept known as "liberty of contract" that treated a man or woman's "work" as a commodity that they could dispose of as they saw fit. Liberty of contract was killing our labor force during the years leading up to the Great Depression because people could work 12hrs/day or work for whatever wages they agreed to accept.
The implementation of the National Labor Relations Act changed this, as well as many other laws passed at the time. These laws include 40 hour work week and minimum wage laws. Limiting a person's ability to work 12hrs/day for the same wage, or limiting their ability to contract for whatever wage they want, is actually anti-freedom and anti-capitalist, but Congress decided that public policy considerations outweigh these freedoms.
So, in essence, yes prostitution would be a commodity under the liberty of contract theory, but Congress has already said that liberty of contract can be limited by public policy decisions and laws. In this case I would say banning prostitution is a public policy consideration.
Spes mea in deo est