Oh, whoops. OP said the ball and the table are in a space ship. Well...
I assume the table and the ball are inside the spaceship and the spaceship is totally closed. The force of gravity pulling the table due to the greater mass of the ship will pull everything down (edit: I know there is no up and down in space, but come on...). However, the "ceiling" of the ship will pull it up, canceling it out. However, if we assume that the base of the ship has much more mass than the top, it will attract the table and the ball and there will be a normal force that keeps the ball from crossing the table. Correct me if I'm wrong