Both Zn-doping and $c$-axis magnetic fields have been observed to increase the spin stripe order in La$_{2-x}$Ba$_x$CuO$_4$ with $x$ close to 1/8. For $x=0.095$, the applied magnetic field also causes superconducting layers to decouple, presumably by favoring pair-density-wave order that consequently frustrates interlayer Josephson coupling. Here we show that introducing 1% Zn also leads to an initial onset of two-dimensional (2D) superconductivity, followed by 3D superconductivity at lower temperatures, even in zero field. We infer that the Zn pins pair-density-wave order locally, establishing the generality of such behavior.