According to Hindu scriptures, it is a sin for a man to have sex with most women who aren't his wives.
An ancient acharya says that it is permissible (not sinful) to have sex with your wife(s) and with women who have had sex with at least 5 different men.
There is also this verse from the Narada Smriti:
Nārada (12.78).—‘Intercourse is permitted with a wanton woman who belongs to another than a Brāhmaṇa-caste, or a prostitute, or a female slave, or a female not restrained by her master; if these women belong to a lower caste than oneself; but with a woman of a superior caste intercourse is forbidden.’
However, Medhatithi, an ancient Manusmriti commentator, doesn't agree with that viewpoint:
In the case of women who have not been wedded by any one, and live by prostitution, it is doubtful whether or not an expiation is necessary for having intercourse with them.
“What then is the right view on this point?”
The right view is that expiation is necessary.
Because the restriction (that one should he devoted to his own wife) has been directly enjoined, and expiation has been declared to be necessary in the case of one’s omitting to do what has been enjoined (11.41). ... The case of the ‘wanton’ woman has been already explained, and the prostitute also is an ‘unchaste woman.’
Are there verses in any scripture that state that this is permissible?