My first thought was anal glands as well. Our vet showed us how to express Katie Scarlett's glands. I now do this every week when we bathe her and always seem to get a little. It is the worst smell ever, but I do it right before we go in the bath, so the smell is not there for too long. I remember the very first time I did them myself, I made the mistake of not holding the paper towel up far enough. It literally squirted in my hair! I know that is disgusting, but just forewarning there. Before expressing, make sure you hold the paper towel up there to catch any. That day, I immediately handed Katie Scarlett to my husband and went to wash my hair. I think I shampoo'ed like 5 times and then shampoo'ed her twice. Oh the joys of learning during this yorkie motherhood!
Good luck to you!