Yes, albeit not irreversibly
There are effects in the game which can cause changes to a PC's alignment against their will - the most well known of which must undoubtedly be the helm of opposite alignment:
When placed upon the head, this item’s curse immediately takes effect (Will DC 15 negates). On a failed save, the alignment of the wearer is radically altered to an alignment as different as possible from the former alignment—good to evil, chaotic to lawful, neutral to some extreme commitment (LE, LG, CE, or CG). [...]
Only a wish or a miracle can restore a character’s former alignment, and the affected individual does not make any attempt to return to the former alignment. In fact, he views the prospect with horror and avoids it in any way possible. If a character of a class with an alignment requirement is affected, an atonement spell is needed as well if the curse is to be obliterated. When a helm of opposite alignment has functioned once, it loses its magical properties.
Except when specifically stated otherwise (such as by the helm above), the atonement spell is a panacea for most involuntary alignment changes that might affect a character, as it has the capability to unconditionally reverse magical alignment changes and restore class features lost due to alignment restrictions (so long as the character has returned to a compatible alignment). Forced alignment change is also a relatively rare in-game mechanic, so it's not something you should probably worry about much on that basis alone.
What's more common will be your GM enforcing an alignment change on a character based on the way they act in-character, which could be contentious if you and your GM don't have the same views on the meaning of alignment. If you play a character class that has alignment restrictions, I would strongly suggest talking to your GM about what you both think the relevant alignment means, so that you can come to an agreement (or at least you know how your GM intends to rule if it comes up) and you aren't setting yourself up for an unpleasant shock later on.