Liz Buchanan BVSc MRCVS
Hello. This is typically how flea reactions manifest; it may be that your dog needs to be treated for fleas. Tell tale signs include small black bits of dirt in the hair, particularly by the base of the hairs, when you look closely. Rub the black flecks against a damp folded tissue and they leave a reddish-tinged trail; this is flea dirt (digested blood). If a dog is allergic to fleas, they can get quite a dramatic reaction without any fleas or flea-dirt being visibly present, because having met a single flea (too small to find) makes them itch so much. Other reasons for scratching in that area can include back or hip pain, or anal gland disease. This sounds extremely sore and the viscious itch-scratch cycle may need drugs to break it, so it sounds as though you should involve your vet.