There are several definitions for quasi-static. They are not equivalent. There is some confusion about it in the literature, notably on Wikipedia's page.
First, before you ask if quasi-static implies reversible, you must make clear you are talking about the same system. March's answer explains this. I'll focus on the question once this confusion is cleared: you are talking about the same system.
As far as I know, the word reversible does not make sense for a non thermally isolated system. Hence you must choose a thermally isolated system, in other words, an adiabatic process. If a sub-system is not thermally isolated, then consider the larger system. Now we're ready to get at the core of the question.
Among all the definitions for quasi-static we find:
- the equilibrium is sufficient at each infinitesimal step for the macroscopic variables (such as temperature) to be defined. Not clear: for each sub-system, for the global system?
- the motion is very slow.
- the change is slow enough so that the system is at equilibrium at each infinitesimal step
I'll focus the latest definition, which I'll call "truly quasi-static". With this definition, quasi-static is equivalent to reversible. Let's focus on the statistical mechanics foundations (with classical mechanics as a background). In statistical mechanics, a "truly quasi-static" process can be defined as:
"The process is equivalent to a progressive change in the system's Hamiltonian that is:
- Adiabatic : the change does not depend on the unknown micro-state (position in the phase space).
- slow and smooth enough so that the system has time to go through its full energy orbit (in the phase space) for each infinitesimal change in the Hamiltonian. In other words the system can be considered at equilibrium at each infinitesimal step."
This is officially the definition of "adiabatic reversible". When you write $dU = -PdV$ ($V$ is any variable the Hamiltonian depends on and $P$ is the generalized force), you mean this kind of process. Even though this defines "reversible", it is interesting because it does so thanks to an intuitive concept of quasi staticity (slow change) instead of the intuitive concept of reversibility (the reversed process leads to the initial state). The two definitions are equivalent. This constitutes a theorem.
Usual examples :
- moving the piston of an insulated gas chamber (much slower than the speed of sound).
- moving a piston of a gas chamber in thermal contact with another gas (slow enough to allow thermal equilibrium at each step). In this example, the system under consideration is the union of the two gases.
- Counter-example : the irreversible Joule (free) expansion
This definition excludes heat transfer, since in the case of heat, the Hamiltonian varies in a way that depends on the micro-state (during each collision with a mollecule from the other system for example). It excludes friction. If the motion happens to be very slow but the pores are very small, then the Hamiltonian varies abruptly. It also excludes this interesting case mentioned by Huang : “a gas that freely expands into successive infinitesimal volume elements”. Indeed, if the potential wall is smooth, this cannot be a free expansion but a usual reversible expansion.
Now, consider this definition of quasistatic : "The system is at equilibrium during the process (so that temperatue and other variables are defined almost everywhere) except possibly in small places where some irreversibility happens".
This allows friction and viscosity. With this definition, you can say that quasistatic does not imply reversible.