I don't remember exactly how the blue-tail fly became the spirit animal of Rufus, though, as usual, it started as a small, offhand thing that soon harassed its way into a prominent role in the story. And I've never spent a lot of time around cattle or horses, but I have had some unpleasant encounters with horse flies on many walks down the dirt road that leads from the cabin past a pasture to Cane Creek.
One of the early references in Rufus that a lot of younger readers might not get is in the scene where Rose meets Mott and the subject of the blue-tail fly comes up in their conversation. When Mott tells Rose that people in Crockett call them "blue-tail flies," Rose says, "Blue-tail flies? Like in the song?" And Mott asks her, "Now where would a young girl like you learn an old song like that?"
I think I probably first heard it from a Burl Ives TV show, though I can't remember for sure. When I was a younger man and learning to play songs on the guitar, I bought Pete Seeger's book of American Folk Songs, and that's where I learned it. It's one of the songs I used to play for my kids when they were little.
Burl Ives's version is probably the most famous, and usually comes up on top of any YouTube search, but I found this one by Big Bill Broonzy, which I like. (Actually, I'm taking on faith that the poster was correct in connecting the audio to Broonzy; I've seen cases where songs are misattributed on YouTube.) Anyway, here it is: