If you buy a pirated book on Amazon you get to keep the book and the pirate printer is the one persecuted.
Same thing applies here.
Up to 80% off all works that are in copyright terms are accidentally in the public domain. A well known example is Night of the Living Dead. It is not your job to check that the copiright on a work you use is the correct one.
The only reason you get to keep the book is because no bothers to enforce the law, this doesn't make it legal.
And it is your job to check that you have the rights to use other people's work. Ignorance is not a defence.