In general relativity, there is no dispersion in gravitational waves, while some modified gravity theories predict dispersion phenomena in the propagation of gravitational waves. In this paper, we demonstrate that this dispersion will induce an observable deviation of waveforms if the orbits have large eccentricities. The mechanism is that the waveform modes with different frequencies will be emitted at the same time due to the existence of eccentricity. During the propagation, because of the dispersion, the arrival time of different modes will be different, then produce the deviation and dephasing of waveforms compared with general relativity. This kind of dispersion phenomena related with extreme-mass-ratio inspirals could be observed by space-borne detectors, and the constraint on the graviton mass could be improved. Moreover, we find that the dispersion effect may also be constrained by ground detectors better than the current result if a highly eccentric intermediate-mass-ratio inspirals be observed.