Q: Is it permissible to take fiction books from the public library?
A: It’s like asking, suppose an apple fell into a toilet bowl, can you take it out? It depends, can you take it out? It depends, what else was in the bowl? There are certain books that might be in the public library that are still readable. But when you walk in, you must know immediately, you smell the odor of tzo’ah [excrement], it’s a foul place today more than ever before. And it’s recommended that you stay out in order that your garments should not be redolent with the fragrance of the public library, because the books are terrible today. Children should be trained to stay away. And I want to say it’s a big error of the principals of the English departments of the yeshivos and Bais Yaakov schools who give children assignments to go to the library. It’s irresponsibility. Maybe twenty years ago, today not. So the principals, men and women principals, should no longer send the pupils of the English department of the yeshivos and the Bais Yaakovs to the public library. [This question was from the 1980s -Ed.]
From Rabbi Miller Book Q&A #2 Link