Protecting Voltage Regulator

Can it get ruined?

It depends on the regulator. 1117's for example don't like that much. What you should do is to put a diode from the regulator's output pin to its input pin. Any diode will do.