> This doesn't translate to the code you write. The most one can say is that they are violating your copyright, [...]
You are really trying to hairsplit that one intangible personal property right is “owned” and another is not?
This is conceptually backwards.
In general, you have the right to do anything not constrained by law. Copyright is one such constraint, but fair use is carved out from copyright and specifically not included in copyright protection. Ergo, you don't need to do anything to have the right to fair use.
This means that publication is irrelevant. Even if a work isn't published, and you just happen to find it under someone else's couch cushions, you have the right to make fair use of it.
Of course, as goes without saying, fair use is quite limited, and the creator retains copyright and other rights (moral, etc.).
(None of the above is legal advice.)