The solution for this is a cultural change so that women are expected to carry knives, and use them if attacked by a man.
This cultural change happens not because of a law, but because women decide to do so and frown on any woman who goes out in public without her knife. Why? “Because this is what girls and women do!”
Knives are cheap and ubiquitous, and once enough rapists are poked and slashed, they won’t be able to do so without a moment’s hesitation out of fear. And psychologically, this moment of hesitation will prevent many attacks in the first place. Helped considerably by most rapists being cowards.
When enough women do this, and insist on other women and girls doing this, it reaches a threshold where girls are raised with the cultural norm of having, and if need be, using a knife.
“Because this is just something that girls do.”
Many rapists could easily wrestle a knife from a woman, but were your trend to take hold in the least, we could expect rapists to regularly carry knives themselves—and thus maintain the advantage.