Yup. . .that's why there were hardly any "soiled doves" for the pleasure of those hard-working cowboys.
You'll find that just about the time it was discovered that various gold compounds as well as mercury could be used to treat (if not cure) syphilis, prostitution gained serious ground. That's AFTER the Civil War.
Still, your basic urban populations engaged in all sorts of behavior considered highly dangerous in predominantly rural America at that time.