Is it legal for my opponent to step on my blade and hit me while it is stuck?
Stepping on a blade is not an offense in itself, but it usually stops the bout. Neither the USA Fencing nor the FIE rulebook lists it as a fault. It happens most often in épée, when one fencer's point goes low for a foot touch and the other steps forward onto the blade or counters to the mask. Fencing at close quarters is only allowed while both fencers can use their weapons properly, so once a blade is pinned under a shoe, the referee should call halt.
What surprises people is that your opponent's hit can still count. When the referee calls halt, an action that had already started before the halt stays valid; only new actions after it are thrown out. So if your opponent steps on your blade as part of a normal attack or counterattack and the hit arrives in that same motion, it usually stands. A fresh attack launched well after your blade got stuck is different: the referee should have stopped the bout, and can annul that hit. Without video, what the referee saw decides, and a judgment of what happened cannot be appealed.
Doing it on purpose is another story. A deliberate stomp or kick at the blade counts as an irregular action, which earns a yellow card and annuls any touch the fencer made, and a version that is dangerous or violent can be a red card. Grabbing or pushing the blade with the free hand is always a red card, and taking hold of the body cord with the free hand is a yellow. Our answer on what is illegal on the strip covers kicks, hand blocks and body contact in more detail.
If your blade gets trapped, keep hold of the handle. Deliberately dropping your weapon during a phrase is a red card, and a hit your opponent started before the halt still counts. Get your body back out of distance and let the referee stop it, rather than wrestling for the blade within reach of their point. To avoid it in the first place, do not leave your point lying on the floor after a missed foot shot; bring it back up or retreat with it. If you think the referee missed a halt, ask one calm question after the call.