Do you have to be unaffiliated to found a new religion?
Yes...
You also lose all your titles.
But you can regain them. You can be a priest-lord. I'm unsure if you can be elected to a government position though.
You can be elected / appointed to Government Positions as a Priest, at least in a Theocracy.