In my experience, in Boston, nobody will bat an eye if you go into most libraries at MIT (so long as you don't go breaking into wiring closets) or BU. Harvard is very restrictive because it'd probably be overrun with tourists otherwise. I think libraries in big cities (NYC) tend to be more exclusive, to keep out the riff-raff and homeless people, but such cities usually have good public research libraries.
In Toronto, the the UofT libraries are accessible to anybody. However, I did once get kicked out of the Law Society of Upper Canada library when I mixed up Osgoode Hall with the Osgoode Hall law school when I was doing research for a high school class, and I'm still bitter about that.