She must be rubbing it to alleviate some sort of discomfort associated with itching. Do you spray or wipe flyspray on her? Have you checked to see if the skin between her teats is clean? Does she have a skin ailment such as rainrot or itch? Does she have pinworms? Is she allergic to fly bites? Some horses have very sensitive skin and cannot handle the sun or bugs, if she can get relief from triggers, her itching should stop. You could buy a tail wrap or try protecting it with vet wrap, but that may make her even more itchy and cause her to rub harder.