So a library can't have any licensing restrictions as to what the code that uses it will do?
I can't tell how that question relates to the post you replied to. Does it have something to do with the definition of derivative works? Or the purpose of copyright?
Taking the question by itself, though: I think it's possible to craft a copyright license for a library so people are restricted in how code they runs uses the library (to the extent you have to copy the library in order to use it, because you need permission from the author to copy it). It's not easy, since a condition on a copyright license must be met before the copying happens, but I think it's been done successfully.
Copyright © 2018, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds