No, they can’t win. In that scenario they will be systematically beaten by Character A and probably thoroughly thrashed under the sufferance of their instructor. This is a good thing for your story and in the long run, a good thing for Character B’s development.
Let’s talk about why:
There are a few flaws going on in your language choices about Student A that come across as cliche, even though you don’t mean for them to be. The general assumption about training is that it bulks someone up, this is commonly presented in Hollywood action movies where the “average” sized protagonist suddenly finds themselves facing an enemy that is very, very tall and usually very bulky. The difference is obvious, however, this is a visual gag and has little bearing on reality (also because it’s a visual gag, it’s not really helpful for writing unless you want to play into cliche).
For sword combat, replace stronger with faster (this will be true regardless of whether it’s a long sword, a claymore, or a rapier) and bigger with more agile. You can also add more cunning and more controlled, especially if Student A is at the stage of using fast talking and insults to distract their opponent between strikes. A character who can fast talk while fighting is one where the strikes and blows they are using have become enough of a second nature that they can turn their mind to strategy and character assessment. Yes, smack talk is actually a legitimate strategy during a fight, assuming the character has the conditioning and breath get away with it.
If this is what Student A is like (and this is what most training sequence enemies are like) then the comparison is this: Student B is the average new recruit for the track team and they’re sprinting against it’s best member. As Student B sprints, the track team member keeps pace beside them spitting out insults, you want to say something, but Student B can’t because they’re too busy sucking down oxygen. However, this spurs them to try harder and run faster, faster and faster, in silence, harder than they’ve ever run before. They think hey, I’m doing pretty good. Until they get to the final turn and Student A opens up their stride and sprints off like it’s nothing leaving Student B huffing and puffing. But Student B is still angry, so they chase them as hard and as fast as they can (or they give up). They don’t catch them, they are soundly defeated.
However, it’s not a defeat because not only now do they have an understanding of how far down the totem pole they are, they’ve been given a rival to chase, and best of all, they’ve pushed themselves (with Student A’s help) to find a source of inner strength they might not have known they had. They’ve learned more through defeat than they did through victory.
This is why many instructors do in fact put students, especially new ones, into “no win scenarios” against more powerful opponents. Kirk’s Kobayashi Maru feel good/ego stroking antics aside: facing and being beaten by an opponent that is better than you in a controlled environment, learning what that feels like, and how easily you can be manipulated is an important step towards becoming a better warrior.
The best fighters are cautious and disciplined strategists. They may be congenial and friendly, but they are very much in control of themselves, their emotions, and their environment. Student A is already in control of the fight and that in a nutshell is why Student B can’t win, even when they attempt to change the rules.
Okay, let’s talk about Student B:
Getting frustrated and throwing down or throwing away a weapon is actually a common beginner mistake, so brava! This is a good learning experience. The thought process is: this isn’t working, so I better try something else. However, it’s a bad idea because the wooden blade was what kept the fight anywhere near even and without it, they’re screwed.
Student B either throws aside their blade because they think it’s a good idea or they’ve been driven to do it out of anger. If it’s anger, it’s a better idea for them to throw the sword at Student A and then lunges. This is the only semi-saving grace for them because (stupid as it is) it suggests that they have some grasp of strategy. Otherwise, they’re just ditching the sword in favor of lunging at an opponent who still has their weapon and now has greater reach.
If Student B throws away the sword and lunges, then all Student A has to do is hold their sword out and let B “impale” themselves on it. Short, quick, and boom it’s over. If they throw it at A, then A has to knock it away or risk getting hit. However, if they do throw it at A, A is going to be a little upset about it especially since B just broke the rules and risked both their safety on a stupid stunt. If B throws the sword at A, then B is in the wrong (even though they’ll feel like they were in the right).
Their master/instructor will then probably allow A to thrash B (within reason, no long term damage) so that they can fully feel their mistake and then will assign them some sort of punishment work afterwards. They’ll punish A too because A did give in to anger after B threw the sword at their head.
This brings us to:
There will be an instructor watching this fight and they will intervene when necessary. Sparring bouts tend to happen one on one in front of the whole or half of the class (if there are enough instructors to handle more than one bout at a time). The observing students wait their turn and they learn by watching their fellows fight. Sometimes, if there’s a second rival group or section, instructors will bring the two together and have them spar each other one on one in order to build a greater sense of competitiveness and camaraderie within the respective groups.
Both Student A and Student B will be punished by their respective teachers depending on what happens after B throws down the sword. B will also have to face the criticism and humiliation in front of their fellow students, which will make the sting hurt that much more and may be the inciting action that drives them to throw the sword.
Try to remember that sparring is about learning, it’s not about beating the odds or winning and losing. The point of a character in training is not to show how talented and skilled they are, it’s to show them growing up and learning. Life isn’t always fair, but even the ruthless and most sadistic teachers often have the students’ best interests at heart. Other characters may be responding to a stimuli or understanding of the situation that Character B doesn’t have access to yet.
Let your characters fall down and make mistakes during training, that’s what training is for and why it’s there. It’s important to the development of the characters in the story.
Try to not vilify A or the instructor.
It’s a good learning experience that will help you flesh out your characters. All of them. So, I suggest you keep it. Besides, B isn’t just soundly beaten, they lose the fight on the basis of what they thought was a good idea. That’s actually pretty great.