Well it is possible indeed, but it depends on the phone version.
I have GT-I9505, and the phone had NOS (Portuguese Carrier) ROM, i've flashed an unbranded ROM and it worked.
But it's prefereble to simply install a custom ROM, much more cleaner and you can get ROMs with Samsung look but without Samsung Crappy Apps
I'm currently using Kushan ROM from XDA user Kushan08 (check it on XDA) and it's simply awesome and fast.