I don't know if you can detect which side was hit by default (for a normal collision check in most cases the answer is no, it just returns a boolean of whether there's a collision or not), but there are other ways around this.
Obviously if you just say "is there a collision? Reflect" you can run into a problem where the ball hits the wall, reflects but not enough to actually make it back to "outside" the wall, reflects again, and so on every frame where it just gets stuck in the wall forever. So you need to avoid that. One of many ways of doing this: treat the ball as a state machine that is by default in the "non-reflecting" state. When in this state and you detect a collision, change it to the "reflecting" state. When in the reflecting state, ignore collisions, and only return to the non-reflecting state when there is NO collision.
Another problem: how do you tell the difference between a side collision (horizontal reflection) and a top or bottom collision (vertical reflection)? The original Breakout actually didn't make this distinction, so much; when the ball hit a brick, it would reflect vertically no matter where it hit, and the walls and ceiling were presumably hard-coded (checking the x or y coordinates of the ball). Changing the trajectory on collision with paddle is just a matter of comparing the x coordinate of the ball with the paddle to figure out sides. You could use that method for other things as well, so if you wanted the ball to reflect horizontally OR vertically against a brick, I'd be comparing the coordinates of the brick with the ball.