The decision is part of a larger trend of libraries’ being caught in the middle of a national debate over children’s access to information.