The role of the rapier
The weapon the knight uses is a stocco, a type of sword (literal translation: rapier). This weapon is only used once in the entirety of the Decameron. We only encounter it in this novella as it’s being used by the spirit of the knight.
The rapier is used by the knight to stab his lover directly in her heart, the same way the knight had robbed himself of his own life, thereby taking away his chance of ever loving again. The woman must forever endure the same violent, painful death of the knight. Looking at the passage in this way, the literal action of the knight stabbing himself through the heart can be interpreted as the heartbreak he felt when he was still alive, since he too suffered from unrequited love because of a cruel woman. And since this woman did not feel the same pain when she was alive (she didn’t love him, after all, thus she had no broken heart), she will be forced to feel it in this gruesome way by being stabbed over and over in the afterlife.