A rapier was a sharpened, pointed, thin sword used for attack and defense.
While infected by the polywater intoxication, Sulu chased a number of crewmembers with a rapier. (TOS: "The Naked Time")
In Reginald Barclay's holodeck version of The Three Musketeers, the characters played by Data, Captain Picard, Geordi La Forge, and Commander Riker used rapiers for their sword fight with Barclay. (TNG: "Hollow Pursuits")
Data kept a rapier in his quarters, stored in a shelf. (TNG: "Timescape")
Captain Kathryn Janeway also kept a rapier in her quarters. It was located on her dresser alongside one of her reading chairs. (VOY: "Persistence of Vision")