The Diarrhea may have caused your anus to become irritable. After anal sex, it's common for the receiver to have diarrhea afterwards, this is nothing to worry about.
You had zero risk for HIV. Your test is 100% reliable, and negative, because you didn't need to test for a disease you cannot possibly have.
If you had vaginal sex, anus irritation has absolutely nothing to do with the sexual activity.
What was your sexual exposure - anal, oral, or vaginal, and was it protected, or unprotected?