You would if you could and it'd probably work.
I believe the position of the French government is that anyone in the path of a crime can be ordered to block the part of the crime that relates to them, without having any liability for the crime. So quad9 are not criminals for not blocking pirate sites, but still have to block specific sites when ordered.
Where does this line of reasoning end though? Shouldn’t the browser makers be blocking the sites too? What about curl? What about the OS and local DNS resolvers (unbound etc)? Maybe Ethernet and wifi cards should contain blocking logic? At some point you have to draw a line!