In the first example, when rubbing hands, the biological energy of the human body is converted into the mechanical energy of the hand, and the internal energy of the hand is increased because the friction force does work for the opponent. It cannot be understood that the internal energy of the hand does work and increases the mechanical energy of the hand. This should be understood clearly.
You completely misunderstood the second example! When the ball falls, it doesn't do external work. When falling, gravity does work, which makes the kinetic energy of the ball increase and the potential energy of gravity decrease. If the friction effect is not calculated, the mechanical energy of the ball remains unchanged. If the friction force is calculated, then the mechanical energy is converted into the internal energy generated by the friction between the ball and the air, rather than the external work done by the ball.
Finally, to sum up, you should consider the overall energy change in the process of doing work. The energy conversion of an object is not necessarily the external work done by the object.