If your rain barrel is screened air can get in but critters cannot, no squirrels, lizards, etc. Screening it also prevents mosquitos from getting in. My rain barrels are NOT mosquito breeders! It is unlikely that birds would poop directly in your rain barrel, but the water does come off the roof, so I expect that it is pretty likely some bird poo gets in there that way. It will just break down and become fertilizer. You aren't going to drink this water! I did some looking up one time and posted results here showing that rain barrel water is quite safe for garden/ ag uses, though not for drinking. That was 2-3 yrs ago and it is unlikely that our search function is good enough for me to find the post again.
OK here you go, 4 years ago I posted a bunch of evidence about rain barrel water safety:
https://www.helpfulgardener.com/forum/vi ... ter#117078