The HCSR04 will measure the distance to the wall but not the wall thickness.
You say you want to measure the thickness of the "product" wall. If this is a manufacturing application you might be best to buy a commercial device that does this.
If you want to build something yourself you would need to consider the minimum and maximum thickness of the wall and the speed of sound through the material the wall is made of. The speed of sound in air is 340.29 m/s and is likely to be faster in a solid. The device you build would be placed on the wall, it would generate pulses and try to detect reflections from the far side. The wall thickness range and speed in the material should let you calculate how fast your device would need to operate to be able to measure the wall thickness.
I don't think this would be an easy task and its probably beyond beyond the capabilities of an Arduino, but somebody might correct me on that.