Because molecules can have their orientation locked when embedded into a solid rare-gas matrix, their hyperfine structure is strongly perturbed relative to the freely rotating molecule. The addition of an electric field further perturbs the structure, and fields parallel and antiparallel to the molecular orientation result in different shifts of the hyperfine structure. These shifts enable the selective detection of molecules with different orientations relative to the axes of a rare-gas crystal, which will be an important ingredient of an improved electron electric dipole moment measurement using large ensembles of polar molecules trapped in rare-gas matrices.