Writing an essay on the freedom of information that the internet brings us, I have limited time to research. Thanks in advanced!
Most individual libraries (like Aristotle's library) and those belonging to philosophic schools, remained private property (if you'd like to read up on Aristotle's library, see Strabo 13.1.52 and Plut. Sull. 26.1-2). Institutional libraries began with the Hellenistic monarchies, though the 'public' library of Pisistratus (Gell. NZ 7.17) is no doubt myth. The first Ptolemies collected ambitiously and systematically. The Alexandrian Library became legendary for this, and Callimachus' Pinakes made its contents accessible.
In short: it appears anyone could use the libraries that were publicly endorsed, though many libraries remained private. Indeed private libraries remained fashionable throughout antiquity (see Petron. Sat., 48 -- when Trimalchio boasts about having a private library. I would also look at Seneca the Younger and Lucian who satirise books that are only for show and public use -- Sen. Dial. 9.9.4-7; Lucian, Ind.).
Source: Oxford Classical Dictionary.