Without playing the game, it is hard to figure out what solution will look the best. I’m assuming you are playing on the XY plane. Start with something like this on the ball:
You may need to adjust the 0.99 value. You may only want to make this correction when you detect a collision with the wall. There are other ways to fix this problem if this one is not right.