What happens to a normal transformer when the frequency is increased and the sine wave is changed to rectangle?
Depending on how accurate you need results to be, you can model a transformer as equivalent to a series resistor, inductor, and an ideal lossless transformer.

See here for the equivalent circuit of transformer. You can measure your transformer to find the parameters for the model. If you have a model you can study performance versus arbitrary inputs.

A 220:12 transformer has a ~18:1 turn ratio. If you apply 220V to the secondary it will develop 4 kV on the primary side, which could exceed the breakdown voltage of the insulation coating on the primary side wires, causing a short-circuit in the primary side or possibly destroying the insulation. 

Mains is not to be trifled with. Do not exceed the voltage rating on a transformer, and if this is an experiment you should have an isolating transformer or residual current device/ground fault circuit interruptor protecting you.