I agree: it depends on how you define "dystopian". Is Mad Max a dystopia or just a rubbish future? My instinct is to say that a dystopia occurs where a single group or ideology oppresses the masses, as per 1984 or The Handmaid's Tale. But I think it's literally just a bad society, so that would include chaotic futures and apocalypses.
As for fantasy, I don't think a book with historical levels of squalor would really count. For me it would take a level of control and oppression that went beyond "a nasty king" or "the plague" and probably couldn't be carried out without 20th century technology or the equivalent, which I suppose requires magic. So I'd call Mordor a dystopia (but obviously not Middle Earth as a whole), at least for anyone who isn't on Sauron's side, but partly because of the level of control Sauron has over his minions.