hmeadq-I don't know your dog and whether fleas or diet are a problem or not, but dogs will scratch or yawn when bored, or when they just don't want to work. I've been there!

I'd just tell him that's enough, back to work, and have him do a sit or down, praise him and bring out a small toy for a quick tug.
You're in class to learn, not to play, but you've got to do what works for your dog. Make it fun and exciting and he won't have time to be scratching.
Best wishes-
kathy
p.s. I'm unable to send you a pm, and I'd like to know if you'd be interested in a Herding Clinic coming up this month? It's for newbies! Let me know...