It's a common enough saying but is there any truth to it? And if not, what is?
This really depends on your definition of profession and on prostitution - a cop out, I know. The saying comes from biblical references that indicate that sex was selling extremely early on. But historically, do we consider hunter-gathering a profession? Farming? Masonry? Prostitution? How defined does the work have to be?
Similarly, what defines prostitution depends as well. While we commonly conceive of it as sex for money, what about before the invention of any type of modern style money? If it's an exchange for goods or services, who is to say what the minimum amount of personal commitment to the prostitute defines it as solely for the sex?
As you can tell, there's no way to claim that prostitution is the oldest profession, simply because the idea of a 'profession' is far too recent to do so. Generally as a saying it is used to refer to a seemingly fundamental part of human nature that people are consistently willing to trade goods or services of some sort for sex, across often vastly different cultures and times.