First consider there is no friction. The point of contact between the ball and the table moves with the direction of the global motion.
Now introduce friction: you have kinematic friction slowing down this point thus make the ball roll due to the induced torque. You will have a motion in between the cases of pure sliding and pure rolling.
In this case the direction of the friction force is obvious (by definition of the friction).
Now if you do the things at the limit case, you will have a pure rolling. In that case the point of contact has zero instantaneous velocity and if the motion is horizontal, with constant and angular and linear motion, you don't need any friction, if you had friction, this would induce a torque and the angular momentum will change.
If you introduce acceleration or a non horizontal surface: in that case you have static friction: the point cannot move forward, friction is directed opposite to the "accelerated" direction, you introduce a torque.