In fact this is a non-conservative system and there is therefore no reason to state that the energy lost by one will be gained by the other; some of it will have dissipated as heat at their interface.
This is easiest to see in the center-of-mass frame, where the momentum begins and ends at zero. If two objects come together and then stick together, then the kinetic energy must have been greater than zero before the collision, and zero afterwards as they both must be at rest in this frame of reference. The fact that they must have zero total momentum in this frame of reference means $$m_1 v_1 + m_2 v_2 = 0$$which can be rewritten as $v_2 = -(m_1/m_2) v_1$, their relative velocity is therefore $v_0 = v_1 - v_2 = \left(1 + \frac{m_1}{m_2}\right)v_1 = -\left(1 + \frac{m_2}{m_1}\right)v_2.$ If you try to actually add these fractions like we all learned in school you might see that there is an interesting mass $M = m_1 m_2/(m_1 + m_2)$ emerging here, with $v_0 = m_1~v_1/M = -m_2~v_2/M.$
The energy lost can therefore be derived in this center-of-mass frame as $$E_\text{loss} = \frac12 m_1 v_1^2 + \frac12 m_2 v_2^2 = \frac12 \left(\frac{M^2}{m_1} + \frac{M^2}{m_2}\right) v_0^2 = \frac12 M v_0^2,$$
where I have used the fact that $\frac1M = \frac1{m_1} + \frac1{m_2}.$
Differences in kinetic energy are reference-frame-independent even though the absolute value of kinetic energy is not, so your actual energy balance in the frame you're interested in needs to be (with your $M$ that I was calling $m_2$, not the $M$ I was using above)$$\frac12 m v_0^2 =\frac12 m v^2 + \frac 12 M v^2 + \frac 12 \frac{m M}{m + M} v_0^2.$$From this one is only a short step from finding $$\left(\frac{m}{m + M}\right)^2 v_0^2 = v^2$$and thus that $v = \pm v_0 m/(m + M),$ and it's "obvious" that we choose the + sign.
However, it is much easier to get to this result by, instead of using an energy balance, constructing the momentum balance, $$m v_0 = (M + m) v,$$which gives you that particular result directly without having to do any of this hard work.
Is energy always transferred from the source to the object when positive work is done by the source on the object ?
Yes, but be careful. If something else simultaneously does an equal amount of negative work on the object, the net work on the object will be zero.
If so, what energy is transferred from the earth to a freely falling body ?
Gravitational potential energy of the earth/body system is transferred to the freely falling body. Gravity does positive work giving the object kinetic energy per the work energy theorem.
The potential energy is converted to kinetic energy in the process. But I see no transfer of energy between the earth and the body.
Energy transfer to the body comes from the gravitational potential energy of the earth/body system. It does not come from just the earth, but from the earth/body system. Neither the body alone nor the earth alone has gravitational potential energy. It is a property of the earth/body system.
And how does energy transfer takes place in case of negative work ?
In the case of negative work, the force is in the opposite direction as the displacement. The thing doing negative work takes energy away from the thing it does work on, as discussed in the next answer.
When a body is moved across a surface which has friction, the friction does negative work. Does it mean that a sort of energy transfer occurs between the surface (source) and the body (object) ? If so, how ?
Yes. When friction does negative work it takes energy away from the object it does work on. What makes friction interesting, however, is that it involves both energy transfer to the stationary surface upon which the body slides from the object, and energy transfer from the stationary surface to the object.
Consider what happens when you rub your hands together. Take one hand and hold it stationary. Then slide the other hand over the surface of the stationary hand. Both hands feel warm. The temperature, and thus internal microscopic kinetic energy of both hands increases. In the frame of reference of the "moving" hand, the "stationary" hand is moving, and vice-versa. In effect, each does friction work on the other.
If a moving body comes to a stop, part of the lost macroscopic kinetic energy of the body goes into the internal energy of the stationary surface increasing its temperature and thus its internal energy. But part of the lost macroscopic kinetic energy is converted into an increase in the internal energy of the object itself, as reflected by an increase in its temperature. If, after the transfer, the body can be isolated (prevented from transferring heat with its surroundings), that increase in internal energy will be retained.
In my mind at least, friction illustrates that when applying the work energy theorem one must account for changes in both macroscopic and microscopic kinetic energy (internal energy). The overall reduction in kinetic energy of the object is actually the loss of macroscopic kinetic energy minus the gain of microscopic kinetic energy of the object.
Hope this helps.
Best Answer
Assume that the system under consideration is the rock.
So your statement
If perhaps better written as
The work done on the rock is negative because the change in kinetic energy of the rock is negative.
A negative amount of work done on the rock can be interpreted as a positive amount of work done by the rock.