Propagation of an extraordinary electromagnetic wave in the vicinity of electron cyclotron resonance surface in an open linear trap is studied analytically, taking into account inhomogeneity of the magnetic field in paraxial approximation. Ray trajectories are derived from a reduced dispersion equation that makes it possible to avoid the difficulty associated with a transition from large propagation angles to the case of strictly longitudinal propagation. As an example, results of general theory are applied to the electron cyclotron resonance heating experiment which is under preparation on the Gas Dynamic Trap in the Budker Institute of Nuclear Physics.