Can roles of primary and secondary windings be reversed?
You can do exactly that.

Respect the maximum voltage on each winding. Transformers cannot be over-volted and still behave themselves.

Due to the various small non-idealities, winding resistance and leakage inductance being the major ones, you will notice that the voltage ratio one way when under load is slightly less than the reciprocal of the ratio the other way.