Is it a laptop?
Getting dirt inside the mouse with a ball is very common. An easy fix (besides purchasing an optical mouse) would be to remove the ball, take a paper clip and scratch at the wheels to remove any dirt.
I will step up and say that your mouse is likely not long for this world. Purchase a new one before it goes out.