Our libraries all have children's sections with signs saying not to leave your children unattended. They are fine with kids browsing while you are in the same room but not fine with children being left alone in the room. There are usually two or three librarians in the room and at least one person stocking shelves. They don't stop people from going in though because it is a public place. I don't think it is an issue if they say they are going to supervise your child and you are free to leave though.
This is a little off topic but I do want to address the idea that people who are unsafe are going to look it and that someone will just turn them away. It is very naive to think that someone who is unsafe is going to look unsafe. People who are unsafe do not generally look unsafe and they don't always give you a bad feeling inside. The person who hurt me the worst as a child was a person who looked and acted very safe and caring. Serial killers, rapists, and child molestors seem like very nice people who would never hurt anyone and at the same time they commit heinous crimes that have long lasting devastating events. They sometimes insinuate themselves into your lives and they sometimes just snatch people in broad daylight with no one blinking an eye because they look so nice. My mom was just telling me about a serial killer who snatched kids from front yards while neighbors who knew them just looked on because he looked so decent and like he belonged. If an adult in the know can be fooled a librarian at a desk can be fooled just as easily. I don't think that this is a big thing to worry about in the situation you describe, or even in general, but I truly hope you are teaching your child not to be taken in by nice looks and sweet talk when you talk to her about staying safe when she isn't around adults who are watching out for her.