What if I want to modify/sell a book that is copyrighted in my country, but is under public domain in X country? If I download a file containing the X country version, am I allowed to do this? If not, then what if someone that lives in X country, create a derivative work using a liberal (as in "do what you want") license? Can I use/modify the derivative work?
If a book is copyrighted in your country (let's call it country A), you can't sell "country X version" in country A, whatever the copyright law in country X says. The book is under the copyright protection, and it applies to all of its versions.
In country X, you or someone else can create derivative works based on a public domain book. However, you still can not sell these works in country A, because that would likely violate the copyright law there.