But then again, so are warlocks, golems, and zombies. Vampires and other Gothic horror elements in the game come from even later. Lovecraftian stuff, later still. D&D as it presents itself is... mildly medieval at best.
According to Wikipedia https://en.wikipedia.org/wiki/Rapier & other sources I've seen, the Rapier originates ca 1500 - which makes it just as Medieval as Full Plate Armour.
Conversely, gunpowder weapons are around 250 years earlier, dating from the 'high medieval' 13th century.