A pitcher applying dirt directly to the ball is considered "applying a foreign substance". The umpire should have called an illegal pitch right away.
Now for the usual argument....How can dirt be a foreign substance when a softball field is made of dirt and the balls get dirty anyway?
The rules don't say a ball can't get dirty or have dirt on it. They say that a defensive player may not intentionally appy it to the ball. That is the rule violation, an intentional act committed by a defensive player.
ASA clarified this rule in an interpretation published on their website:
May 2010: One common question from all areas of the country, especially in the game of Fast Pitch but would apply to other games is “By rule, is dirt a foreign substance?” Do you need to wipe off your hand if you pick up dirt and rub it on your hands?” Rule 6, Section 6A. Fast Pitch states that a defensive player shall not at any time during the game be allowed to use a foreign substance upon the ball. Under the supervision and control of the umpire, powder resin and or an approved manufactured drying agent may be used by the pitcher….
Why would we consider dirt, something common to the ground, a” foreign substance”? If a pitcher or any other defensive player picks up dirt and applies it to the ball we say “no”. We do not allow the application of any material to the ball. Players can apply resin to their hand, not to the ball. If a pitcher picks up a handful of dirt or wipes the ground with their hand, then rubs their hands together, there is no foreign substance being transferred. If a defensive player puts dirt in their hand and throws it on the ground, then catches a thrown or batted ball and returns it to the pitcher do we call this illegal? No. Example: If the catcher wipes their hand on the ground before catching the pitch and returns the ball to the pitcher without wiping their hand off do we have a violation of Rule 6? The answer is no. If we do not, then why do umpires from around the country say that the pitcher must wipe their hand off after touching dirt? Our Rule 6 is very specific, it says any “defensive player shall not at any time during a game be allowed to use any foreign substance upon the ball.”
So, if dirt can and has been used as a natural drying agent to dry off the hands, we do not believe it is mandatory for the pitcher to wipe off their hand if they pick up dirt, throw it to the ground or rub it into their hands. We do not allow dirt to be applied directly to the ball just as we do not permit any other substance. Therefore applying dirt to the hand and not wiping the hand off is perfectly legal by ASA Official Rules of Softball.