On the putting green, you may always clean your ball after lifting it. Unless explicitly permitted by a rule, you may never swap balls while playing a hole (i.e., a lost ball, damaged ball, provisional after an out-of-bounds stroke, and a few other cases). Yes, you may clean in that scenario. No, you cannot replace a lost ball with a new one.
The only time this is permissible is if there is no one around to complain about the ball being swapped. In that case, you can use any available ball (provided it is not damaged) for your remaining holes. If anyone sees you swapping balls, they have the right to complain to the course administrator. Even so, some courses allow this practice on private holes or in special circumstances.
Generally speaking, players should try to avoid swapping balls because it can lead to unfair play. If you lose your ball but find another one on the green, why should someone else's good fortune affect your score? However, there are times when this might be necessary to avoid delaying the game. For example, if you need to make a double-bogey to stay in contention and the only way to do so is by using another player's ball, then by all means go for it!
When you remove your ball off the putting green, it is always possible to clean it. Lifting your ball from anywhere else is always clean, unless when you lift it: To examine if it is cut or cracked—no cleaning is permitted. If no damage is found, put it back in play.
It is important to understand that once your ball has been removed from play, it is no longer subject to any rules regarding weight, size, or material. Thus, you can use a ball of any size or material for cleansing duties. All that matters is that it is non-functional after removal from play.
In case of rain or snow, you should clean your ball as soon as possible after it has been exposed to these conditions. The moisture on the surface of the ball may cause it to rust or otherwise become damaged. Also, make sure to clean any sand or other debris off your ball before putting it back in play.
Cleaning balls is an important part of golf. If your ball gets dirty or torn up during play, you need to be able to clean it properly so you can continue the game. Using a towel and water, it is not difficult to clean most balls.
Can you remove mud off your ball while it's sitting on the fairway or rough, or must you play it as it is? You have to play it where it is. It's known as "rub of the green." If the rules committee has enacted a "lift, clean, and place" policy, you may clean it; otherwise, you may not. The latter case involves playing with mud on the clubface which could affect the way the ball reacts when hit.
If there are any signs that might indicate you can get it cleaned, for example, if some people are cleaning their balls while others are not, then you should ask permission before going ahead with your plan. Some courses require that all balls be cleaned, so check with whoever manages the course's rules to make sure it's okay to do so before heading out to play.
Courses that allow ball cleaning usually post these rules somewhere on their website or in their rule book. They usually specify how far away you need to be from the pin if you want to request a ball roll. For example, one course I played told me I had to be at least 30 yards away from the pin to receive one. Some courses may even have separate distances for regular balls and chipping balls if they offer multiple types of balls (for example, hybrid balls for longer shots).
Usually, only trained staff members are allowed to clean balls at golf clubs. However, some courses may allow general members to clean their own balls if a trained staffer is not available.