Equation of motion for a small rigid sphere in a nonuniform flow