X-ray diffraction measurements show that the high-temperature superconductor YBa$_2$Cu$_3$O$_{6.54}$, with ortho-II oxygen order, has charge density wave order (CDW) in the absence of an applied magnetic field. The dominant wavevector of the CDW is $mathbf{q}_{mathrm{CDW}} = (0, 0.328(2), 0.5)$, with the in-plane component parallel to the $mathbf{b}$-axis (chain direction). It has a similar incommensurability to that observed in ortho-VIII and ortho-III samples, which have different dopings and oxygen orderings. Our results for ortho-II contrast with recent high-field NMR measurements, which suggest a commensurate wavevector along the $mathbf{a}$-axis. We discuss the relationship between spin and charge correlations in YBa$_2$Cu$_3$O$_{y}$, and recent high-field quantum oscillation, NMR and ultrasound experiments.