No, a wand won’t change allegiance then.
J.K. Rowling answered this question in an interview, and said that wands won’t switch allegiance in “friendly” duels or duels done as a competition, they only will in “significant” duels.
JKR: No, I don't think so. I have been asked a lot of times, well what about Duelling Club and so on? Well I think it's clear there that in practice, where there's no real weight attached to the transference of a wand, where it's almost all for fun or purely for competition, there's no enormous significance attached in either wizard's mind to a wand flying out of someone's hand. But there are situations in which the emotional state of wizards where a lot hangs on a duel, that's something different. That's about real power and that's about transference that will have far-reaching effects in some cases. So I think the wand would behave differently then.
- PotterCast Interview, part two (December 24, 2007)
Earlier in that interview, Rowling also mentioned that wands usually have a certain amount of loyalty towards their owners, and the Elder Wand is an unusual exception in how easily it changes hands. Most wands, however, aren’t easily won, and though their allegiance can be won in a “serious” duel, it’s not guaranteed.
MA: But wand lore. Can you go into-- in a more detailed fashion, the way that the wands change hands and how different the Elder Wand is because fans are confused.
JKR: I am going to put up another update on my website about this, and I have one half-written. Essentially, I see wands as being quasi-sentient, you know? I think they awaken to a kind of-- They're not exactly animate but they're close to it. As close to it as you can get in an object because they carry so much magic. So that's really the key point about a wand. Now, the reactions will vary from wand to wand. The Elder Wand is simply the most dispassionate and ruthless of wands in that it will only take into consideration strength. So one would expect a certain amount of loyalty from one's wand. So even if you were disarmed while carrying it, even if you lost a fight while carrying it, it has developed an affinity with you that it will not give up easily. If, however, a wand is won, properly won in an adult duel, then a wand may switch allegiance, and it will certainly work better even if it hasn't fully switched allegiance for the person who won it. So that of course is what happens when Harry takes Draco's wand from him, and that's what happens when-- But you know what I mean. Oh, yeah, Ron. The blackthorn wand from the snatcher. So that would be sort of rough and ready, common, or garden, a wand favoring the person who had the skill to take it. It would favor them. However, the Elder Wand knows no loyalty except to strength. So it's completely unsentimental. It will only go where the power is. So if you win, then you've won the wand. So you don't need to kill with it. But, as is pointed out in the books, not least by Dumbledore because it is a wand of such immense power, almost inevitably, it attracts wizards who are prepared to kill and who will kill. And also it attracts wizards like Voldemort who confuse being prepared to murder with strength.
- PotterCast Interview, part two (December 24, 2007)
So no, dueling as a demonstration, taking part in Dueling Club, or any other type of dueling for fun or competition won’t cause wands to change allegiance. Both Snape and Lockhart would still have their wand’s allegiance after their duel.