I wonder if radleyp was talking about overdrive or netlibrary or one of those library rental e-books providers. My local library has netlibrary. They are DRM'd pdf files, I think. I have only used audiobooks from the online library offerings so far, but it sure would be nice if NetLibrary would support Sony Reader format and DRM, or vice-versa (the Sony Reader supported NetLibrary e-books).
I don't think it's likely that libraries are going away completely anytime soon, but over the decades, I think we will see them evolve into something different. New ones probably won't focus on paper book collections anymore, and might even have trouble funding a building if e-books catch on. But there are so many roles that a library can play, that for a long time the building is probably still necessary and might still have enough public backing to get funding. Even if it means some kind of virtual book collection like someone suggested above.