Your dog could have a ruptured anal gland, a neoplasm, an infected wound, perianal fistula or any other number of issues. It's probably very painful for her to urinate or defecate. Getting her to the vet "as soon as you can" needs to be today!
We had a dog come in for a similar issue that the owner had be trying to treat at home. By the time she came in, the surrounding necrotic tissue was covered in maggots.