No, it doesn't matter. The two principles we use to calculate the velocity with which the ball bounces back are the conservation of energy and the conservation of linear momentum. In applying these two principles, the only relevant facts are the masses of the two objects, their velocities, and their elasticity. [Editor: so you would have to be sure there was no difference in elasticity ("bendiness") of the thinner back wall in the second case where the ball hits "inside" at the back of the block, compared to when it hits at the front surface.]
making a small donation to science.ca.