Polycrystalline high-temperature superconductors (HTSCs) containing iron and gadolinium ions have been studied using the phonon echo technique, whereby a powdered sample is probed by a special sequence of RF pulses and the response having an acoustic nature is measured. It is shown that the behavior of this signal in the iron-containing HTSC materials exhibits some distinctive features in comparison to the response of a conventional yttrium-based ceramic. The superconducting gap estimated for the samples with magnetic ions does not differ significantly from the value for a usual HTSC. This fact is related to a spatial separation of the magnetic and superconducting phases in the materials studied.