That shouldn't effect changing leagues. Raiders can stay in the AFC WestI like this; no division switching necessary.
One catch however - a lot of the talk of stadium building in LA has two teams utilizing it as one of the principal selling points. So it would still involve perhaps Oakland moving to LA in addition to the Rams.