I disagree with the idea that you should only be able to surrender to someone who has declared war against you.
Say that you're a militarily small civilization that is between two superpowers. Both of these superpowers are interested in making you part of their civilization. One is good, one is evil. The evil one gets fed up with trying to coerce you to join, so they declare war. You now have three options:
1) Fight with what you've got, probably loose, and have your entire population wiped out.
2) Surrender to the evil civ and become slaves.
3) Agree to become part of the good civ, giving up some autonomy, hoping that either the evil civ will not want to go to war with the good civ and back down, or failing that, that the good civ will follow through on their end of the deal and defend you better than you could defend yourself.
Anyone that thinks that option 3 isn't a valid option is thinking of GalCiv as a combat simulator, not an empire/politics simulator. I don't know what the current factors are in who the AI surrenders to, but it should follow something like this. Preferably someone who they're on good terms with (to have a better chance of retaining more autonomy), someone that is militarily strong (to be able to defend us or cause the attacking civ to back down), and someone that is a neighbor.