Well I would store the velocity of the ball as an X and Y value (with X and Y having the usual definition for a cartesian coordinate system, X being horizontal and Y being vertical). This would be the velocity that the ball was travelling in say pixels per unit time.
When the ball hits the edge you want it to rebound from the surface at the same angle that it hit it, at the same speed that it hit it. The velocity would have the same magnitude, but would be of opposite sign in the appropriate direction.
For example if the ball hits the bottom or top edge at velocity (X,Y), it will change it's velocity to (X,-Y). If it hits the left or right edge at velocity (X,Y) it will leave at velocity (-X,Y). Obviously this is a very simplistic model. It doesn't allow for spin or for friction. The ball will just keep bouncing around forever at the same speed. That may be ok for playing pong though.