How thick are tyre sidewalls?
Depends on the tyre. Off-road tyres, for example, are a bit thicker than lightweight A-rated pure road tyres.
The sidewall is there to mainly to keep the air in the tyre and make a mechanical connevtion between the tread and the rim.
The rubber in the sidewall has no real function except to protect the reinforcing fibres.
If you can see the fibres underneath the gouge, then few would regard it as safe for anything other than short, low-speed journeys, and then only for a temporary period.
If you can't see the fibres, things are likely to be OK, except that you may have pinched the sidewall and damaged the fibres, and/or the innerliner that holds in the air.
YOu might want to monitor the pressure loss if any over the next couple of weeks. If you lose more than 0.5bar (7psi), then get it checked by a professional. If the pressure loss is minimal, you have probably got away with it.
OK: the official advice, is: get it professionally checked. The above is unofficial, but offered in good faith.