He was hired and acting under the orders of the Library's staff.
Though the Library is 'owned by the government' - it is not 'public property' - for example, you can't do or say anything you want, as you could on the sidewalk.
Though it seems one of the Library's staff was interceding on behalf of the accused - the cop (effectively acting as a cop - and he's hired to do security, so let's not refer to this as some 'random cop who was off duty and saw something) was acting in the interest of the Library - it's up to them who to eject and who not to.
I think the real question here is was the cop acting on his own initiative or at the best of the people that hired him.
If the Library's staff wanted the man out, then it's likely their issue.
If the cop was kicking some guy out wherein his employers wanted the person to stay - well then that's just weird.
But if a authorized security person for a private engagement asks you to leave - you definitely have to leave, and any kerfluffle you start is your escalation.
It seems that the library is intent on pressing charges? Did I read that correctly? In which case the cop was obviously acting on their regard, and perfectly within his right to eject someone.
I think that this guy's beef should be with the Library, not the cop, if that is indeed the case.