AD&D 1e had a magic item, a Helm of Opposite Alignment. If a 1e paladin (or ranger, probably a druid, too) put it on, they ceased to be a paladin until it was removed and they atoned.
Yes but for something like that at least there is something you can do to quickly fix it...the party could restrain or knock the Paladin unconscious and remove the helmet...but there is magic that can flip your alignment and there's almost nothing the part can do for you...they'd need something like a wish spell or miracle to reverse it.
In 5e there is at least attuning to the
Book of Vile Darkness that can shift your alignment. If a character finds it without knowing what it is and attunes to it there are problems.