If it's a steel frame it shouldn't be a problem. If the dents are on a round tube you can roll out a lot of the residual unevenness with
frame blocks. Fill the holes with lead solder (don't weld them; that's bad for lightweight tubing) and file smooth.
If it's aluminum, the frame is toast.