Does the statement "waves only transfer energy, not matter" violate $E=mc^2$? I'm beginning to learn a little bit about waves, and I'm a bit confused. It is said that waves only transfer energy and not mass, but doesn't this violate $E=mc^2$?
 A: You're not wrong, exactly.  When a wave pulse travels from one place to another, it does transfer energy, and therefore mass.  However, there's a useful distinction between the mass that is transferred by the wave, and the mass of the medium the wave travels through (e.g. the slinky for a slinky wave, or air for a sound wave, or water for a water wave).
It is somewhat more accurate to say that waves transfer energy without transferring matter.  When a slinky waves travels through a slinky, the slinky is left in the same place it started - that is the "mass" that doesn't move.  However, the kinetic and potential energy that constitutes the wave has moved from one end to the other.  Now, this kinetic an potential energy does contribute an (extremely tiny) amount of mass to the slinky, and that mass has indeed moved from one place to another.
Most of the slinky's mass comes from the protons and neutrons in the nuclei of the metal atoms, and most of the mass of protons and neutrons comes from the kinetic energy of the gluons that confine the quarks.  So, in a sense, most of the "mass" of the slinky is in fact due to contributions from kinetic energy.  However, it would be silly to say that the slinky's kinetic energy stays in one place while the mass of the wave moves, because on a low-energy macroscopic scale where nuclei are extremely stable, the energy due to gluons is much more usefully described as part of the mass of the metal, and the mass contributed to the slinky by the macroscopic movement of the slinky as the wave travels is much more usefully described as kinetic and potential energy, rather than as mass.
You are rightfully complaining that physicists are inconsistent about what we describe as mass and what we describe as energy, but it's a very useful inconsistency that allows us to describe phenomena on very different energy and length scales intuitively.
A: $E = mc^2$ is a special case of the full equation
$$E^2 = m^2 c^4 + p^2 c^2$$
It only becomes $E = mc^2$ when applied to objects at rest, i.e. with zero momentum. A wave that is transferring energy through space is not at rest, has a nonzero momentum, and is thus not subject to $E = mc^2$.
So no, wave propagation does not violate the equation.
A: You are confusing in this one sentence two frames of reference, of modeling observations.

It is said that waves only transfer energy and not matter,

This was first  said  (modelled mathematically) of waves that are travelling on a medium : water, air , solids.  The mathematics is described by second order differential equations, wave equations , which give sine and cosine solutions that model well the observed waves.
In light, Maxwell's equations also give wave solutions for radiation, electromagnetic waves, and the energy is transferred in vacuum, as the Michelson-Morley experiment showed there exists no luminiferous aether on which the waves travel.
This was the physics of the 19th century, classical mechanics and electrodynamics.

but doesn't this violate E=mc2?

With this we come to the physics of the 20th century. Observations showed that matter and its atoms were composed of entities called elementary particles . This introduced the framework of quantum mechanics, the actual underlying framework of nature,  at the same time with the concepts of special relativity , for fast moving particles.
In a similar way that in the classical framework thermodynamics can be proven to emerge from classical statistical mechanics, at the limits of large dimensions and slow velocities classical mechanics emerges from the underlying framework of quantum mechanics and special relativity.
To speak of violations one has to stick to one frame of modeling. E=mc^2 belongs to the underlying level, where instead of three vectors one has to use four vectors, whose "length" is the square of the mass of the object described. Only for elementary particles and resonances  is that mass fixed and in the particle data table, the masses of all we observe at the very small dimensions depend on four vector additions; a part of the complexity is given in the other answer.
When going from the micro level where quantum mechanics and special relativity hold to the classical wave descriptions the m in E=mc^2 has units of mass and is velocity dependent, but it is not descriptive of the mass coming from the four vectors. It is considered confusing and is avoided in current teachings of physic. This formula is not very useful in analysis of situations and tends to confuse the physics issues.
Nevertheless, the question is legitimate, because the formula is correct, just confusing the issues. In all matter composed by atoms and molecules there exists binding energy, which means that the mass of the bound system is smaller than the sum of the masses of the unbound. This binding energy in principle is affected as the wave passes the individual atoms/molecules, affecting the invariant masses.
At large dimensions though, the changes in the invariant masses of the bulk of the water molecules, for example of waves in water, is so small it can be assumed to be zero. This is due to the small number of h_bar which enters in all calculations , order of 10^-34Js. The changes in the four vector addition will be there but of order zero to all intents and purposes. 
It is only in the particle and nuclear  physics studies and in the cosmological studies that the changes in the four vectors (invariant masses) are large enough to be taken into account.
Ones should keep in mind that physics laws and their violations depend on the framework at which the physics is modeled. The statement about energy transferred is correct in the classical framework within possible measurement  errors, and irrelevant in the quantum mechanical.
A: Since a propagating wave does not involve conversion of mass into energy or vice versa, it cannot violate E=mc2.
EDIT: The, e.g., changes in spring potential energy involved in propagation of a wave along a stretched rope do translate into (very) small changes in mass that also propagate with the wave.
