The American Library Association (ALA) has a Library Bill of Rights. It gives us unambiguous statements of basic principles. These basic principles should govern the service of all libraries.
The Library Bill of Rights addresses privacy in Article VII:
“All people, regardless of origin, age, background, or views, possess a right to privacy and confidentiality in their library use. Libraries should advocate for, educate about, and protect people’s privacy, safeguarding all library use data, including personally identifiable information.”