Hi it could be that its perianal glands could be inflamated, could be also atopy or alimentary Intolerance and even internal parasites! You should take your dog to your vet! He better than nobody coud make a diferencial diagnostic and discard the possible pathologies that i have told you. If you are interested in some tips about your pretty pet's health you could follow me, and read my posts I hope they could be usefull for you.
RE: Weird things my dog does - a series