In fantasy and SF you have a little leeway, in that if you juggle things right, things may come out in a manner that would be anachronistic in a real-world setting. There are limits. A world in which literacy is normal, but the only writing material is expensive vellum. (A monastery's decision to create a book would start with how many sheep to breed, to get the lambs, to get the sheepskins.)
Most anachronisms shout either that the writer lumped disparate times together as, say, "medieval", or even "past" -- or, worse, that the writer considers his environment the universe and projects its customs everywhere, however unsuitably.
Works comically, though there it helps to be blatant. Rusty & Co. can have nice, refreshing Cloaker Cola, and Order of the Stick, an oasis where the pump is putting water into the camel.
Sometimes, however, it can work seriously to create an air of timelessness. The tea-drinking in One for the Morning Glory, which Sir John and the Duke discuss as proof they are not in the lands that are merely actual. Captain Cully in The Last Unicorn taking Schmendrick for Francis James Child and citing John Henry as an example. Both in purportedly medieval settings. But they convince. So very, very, very hard to pull off.