Neutron diffraction has been used to study the magnetic order of the Er ions in superconducting ErBa2Cu3O7. Above the three-dimensional (3D) Néel temperature (TN=0.618 K) a rod of scattering characteristic of two-dimensional (2D) behavior is unambiguously observed, showing that the magnetic interactions of the rare earth ions are highly anisotropic, while there are no significant correlations observed between the sheets of Er spins. The system orders two dimensionally, and as a necessary consequence 3D order also sets in at the same temperature. The order parameter is found to obey the exact Onsager solution for a S= (1)/(2), 2D Ising antiferromagnet. At low T, two separate types of simple 3D antiferromagnetic structures are found, one characterized by a wave vector of ((1)/(2), 0,0), and the other by ((1)/(2), 0, (1)/(2)).