Not technically theft unless the public library no longer has the books. Selling something and saying you created it when you didn't is a different five-letter word: fraud.
Putting prompts in an LLM and saying you "created" the image or text thereof is fraud.