It depends on both the source of the eBook and your location. Any listed book in the public domain (such as on websites like Internet Archive, Project Gutenberg, Hathi Trust, and many others) should be available to you, whether at home or on-site in the library.
Books that we acquire through vendors require a current affiliation for off-site access, but librarians can help you gain access on-site.