The new generation of noise-canceling headphones can block sound without playing other audio. It's not perfect, but it's much better than the "noise canceling" headphones from a decade ago.
The newest cans from Sony and Bose ARE pretty good, but the pressure always bothers my ears after a while, especially when I’m not playing music. There’s no real substitute for a quiet office, other than maybe working remotely.