Personally I would choose an android tablet or an iPad. First, consider that all these devices are really meant to get consumers to spend money on content, preferably the content that comes from the vendor that controls the operating system. Thus, with a kindle tablet you will get a version of the app ecosystem that benefits Amazon the most. With an iPad or an android they are also obviously interested in you buying their content, but your app world is much broader, more so with an android probably, but I think the quality control in the Apple App Store is better.
As for using these devices to read ebooks, your local library probably has a contract with Overdrive or 3M, both of which run via apps and are available in the Amazon, Play or Apple App Store ecosystems. Those are pretty cool for free reading (downloaded or browser based reading), and you can "check out" books on your library card, but you never have to return them. They just disappear at the end of the lending period. Libraries are also starting to sign contracts with Hoopla and Audible for streaming movie content (Hoopla has a large music catalog as well) and with Freegal for downloadable (keep forever) music. Zinio, a magazine content vendor is also signing up libraries to provide e content as well.
Amazon also has a deal with Overdrive that allows libraries to provide access to certain kindle books through the Overdrive app. Also, you don't need a kindle to read kindle books; there is an app for that as well.
Now, having said all this, there is one big thing about reading ebooks on tablets; being backlit, the are certainly nice for reading in bed, but they are also very hard on my eyes. I turn the print to sepia, which helps, but by far the best tablets for reading are still those with a liquid crystal display (or whatever it is) like the paper white. But as I said at the beginning, if I'm looking at tablets, I'd opt for an iPad or something that does not have some limited version of android, which is what you'll get with all the tablets branded by some content provider.
Lastly, bear in mind there are real quality issues to consider. There are a lot of terrible android tablets out there, many with substandard processors and low memory and/or storage capacity. Apple is Apple, so to speak, but bear in mind there are also cheaper entries with that product as well.