not sure. But a couple of our allies left during war and come back and finish their attack without any problems. I think you might be locked out if you get kicked. 24 hour cooling period. Not willing to test out my theory.
After leaving my home alliance to go sightseeing, I was unable to get back in. There seems to be a cool down period after leaving an alliance and joining a new one (you can go to different alliances, but not back to the original). For me, this cool down lasted 4 hours, but I also did other rl stuff and wasn't actively trying to get back in till later.