That goes well beyond self defense training. Actually, most “mainstream” self defense sets directed at civilians don’t include using a knife.
So, I’m going to vastly oversimplify for a moment, but there’s two schools of self defense. Most self defense classes you can get in the US focus on creating an opening so you can withdraw safely, while using as little force as possible. A lot of the “unbranded” self defense classes you can take will use a low force relative of judo and/or jujitsu. It’s designed to minimize harm to keep the victim from ending up entangled in a messy legal situation once they’ve escaped, and because, generally speaking, it’s safer to the practitioner when you’re not pounding on someone.
The other major school of self defense is epitomized by the line from Firefly, “someone tries to kill you, you kill ‘em right back.” This is where you get into self defense forms that involve knives, and firearms. This is a lot less prevalent, and from what I know, it’s actually regarded as a perversion by some segments of the martial arts community. This also doesn’t have the kind of cohesive identity that you get off of the standard self defense schools.
Generally speaking, the minimal force school of thought exists at all levels, from basic to advanced self defense. Lethal retaliation starts out as advanced self defense. The reason I’m explaining this is because, training with a knife is always going to end up in the advanced range, even if that’s just taking it away from someone else.
That said, there is no training in the world that will prepare you to be stabbed in the back by someone you trust. Training isn’t going to save your character if she doesn’t see the knife coming.
If she doesn’t trust them in the first place, or is just extremely paranoid in general, possibly due to past experiences, then she’s more likely to see the betrayal coming, but you’ll notice that’s not a training issue.
The entire point of an ambush, be that a knife between the ribs, or a sudden assault, is preventing the defender from mounting any kind of response. If your character’s getting stabbed in the back, and they don’t know it’s coming, that basically means they can’t fight back. They’ll be bleeding out, struggling to get their bearings, and then they’re dead. Having a character fight back from that usually means their opponent badly botched the betrayal or the shanking.
If your character doesn’t trust her betrayer, then, sure, she can fight them off. There isn’t going to be some state of emotional shock, because she expected something to happen. But, then you need to explain why she knew it was coming. There’s a nasty tendency to say, “well my hero doesn’t trust this Judas figure because… their gut tells them not to.” So when their sudden and predictable betrayal happens, the hero is proved right at the expense of the rest of the story’s cast. It’s an offshoot of Mary Sue is always right, that probably needs to be snuffed out as brutally as you can. It’s also closely related to, “they must be evil because they don’t like me,” which is almost as irritating.
If your character is slowly finding evidence that implicates her betrayer, to the point that she’s actually wary around them, then she’s not going to be shocked when they try to stab them in the back, and she probably could fight them off, because she’s watching them, and literally “sees it coming.” But, that’s a very different situation.
The emotional shock of having a friend turn on you is something that doesn’t really matter, at least for combat. It’s certainly an emotional blow, and we’ve all been there at least once, but when you’re talking about literally being stabbed in the back, with a knife, that emotional shock is something that matters later, after you’ve had time to realize what’s happened. The hypovolemic shock from bloodloss is a lot more immediate.