Against a rapier? Yeah, they’re dead.
Off the top of my head, there’s a couple good, safeish, sword disarms out there. Including ones that will work on a rapier. The problem is, all of these assume you also have a sword.
The wrist flick stunt you’ll see in films actually works. You catch the blade in a parry and then start spinning it. It takes about a full rotation before you’ve moved the blade into a position where it’s working against the wielder’s wrist. This was a favorite of Bob Anderson, so you’ve certainly seen it done a couple times in film. It may look like the recipient is just tossing the blade away, but, they actually don’t have a choice in the matter.
(Also, the part where he’d catch the disarmed blade mid air is freaking insane. As someone who can kind of execute the basic disarm in controlled circumstances, the catch blows my mind.)
If your opponent overextends in a strike you can parry their blade down, and then step on it to force it out of their hand. Not subtle, but simple and effective.
Attacking your opponent’s hand is a fantastic way to get rid of their weapon. It’s a little tricky, and with some weapons, it’s not an option. But, if they don’t have functioning fingers, they can’t really use a sword against you. Most swords have a guard designed to protect the user’s hand against this kind of strike, so viability has more to do with the weapons than the combatants.
Now, if your character is unarmed, everything gets a lot harder and more dangerous. Swords are a very good at killing people. If your character doesn’t have the means to defend against them, they’ll do exactly that.
To execute a disarm, you need to be close enough to access the swordsman’s wrist. Which will also put you in range of the sword.
Stepping back for a moment, if you’re ever in a situation where you’re unarmed and someone else has a sword, the last place you ever want to be is in strike range of their sword.
So your character needs to get through their opponent’s guard without getting killed, and get control of their sword arm, again, without getting killed, and then get it out of their grasp, which may be as easy as cracking their wrist across something.
With a rapier, this is even worse, because of how fast the blade moves. While it’s theoretically possible to get within disarm range. The only safe approach I can think of is one where the swordsman doesn’t know the unarmed character is there and can’t see them. For example: from behind.
There are a few ways to tangle a rapier. Using a cloak or longcoat as a whip can tie a blade up for long enough to get a kill, or, in theory, get close enough for a disarm, though actually getting close enough to disarm by hand isn’t going to be much safer.
Using something like a 2×4 or pipe as a defense isn’t going to help against most swords because of the weapon’s agility, and it really won’t help against a rapier.
Now, all of this is assuming you’re dealing with a trained combatant. Someone who hasn’t been trained with a sword, won’t reliably be able to get a guard up that will keep a trained combatant out. But, if your character is wrong, and they actually are trained, trying this will get them killed.