The rapier is pretty much an invention of the early Modern period--I don't know of any references to them before late 15th century Italy and Spain. I've heard one expert say that rapiers were good for piercing in between small joints in plate armor, but most say that rapiers weren't used in major field battles. Civilians AND military personnel tended to carry them in urban areas, sometimes further than that. Once you have firearms, heavy armor is pointless for day to day use, and firearms really start being used around the same time as rapiers. Though we can start another longer thread on how ineffective early firearms were (I read one naval military historian claim that early ship cannons were notoriously weak, and were at first mainly fired in the general direction of the sails, in hopes of catching them on fire), needless to say the rapier was a niche market, and by the way something of a status symbol. A necessary part of a gentleman's gear in being presented at Court. Mainly Aristocrats and wannabe Aristocrats. The only Commoner having one would likely be a lord's lackey or say the players using fake ones on stage at the Globe Theatre and the like.
FWIW, my campaign is early medieval or earlier in flavor and there are absolutely no rapiers, epees, sabres, or firearms for that matter.