It's the school librarian's job to select books. These people are trained in childhood education.
Your imagination has clearly gone way off the deep end here. Reading that there are gay people doesn't turn people gay. If you think it does, that says more about you, I think.
Trying to hide the existence of gay people from children leads to homophobia from the straight kids, and mental health issues from the gay kids. You are dead wrong here.