though unless war or dispute is involved, I can't see why any nation would stop migration.
Might be less stopping and more controlling migration, having migration then being on that particular nation's terms and needs.
Leaving the Federation would be difficult.
A big part of this would be how amicable the separation is. If members do on occasion leave the Federation, and there is a existing procedure and mechanism in place to accomplish this, then any given separation might be "no big thing."
A simple matter of paper work.
The process of de-integrating your military from the Federation would be the hardest part
Starships, assets and personnel belonging the the separating member would be retained by them, that part would be easy. Assets that were acquired (in part) by way of financial support from the member to the Federation would have to be divided.
If Scotland were to separate from the UK, I would assume that Scotland would get (one example) a certain portion of the warships from the Royal Navy.
and all the issues with members of your world having families with other Federation members.
If it's possible to have family members from species/nations who were
never a part of the Federation, then having family members from places who are
former parts of the Federations shouldn't be a problem either.
Unless the Federation council is going to act like spoiled children toward former members and their people.
Would every individual Starfleet officer in your world have to personally choose whether to retain their Starfleet commission or return home
This might be the case, with individuals having to make a choice.
would you be an outcast if you did?
That would depend on the culture. If Florida separated from the United Stares, i would have no problem with Floridians who continued in the US Navy. The US military (my understanding) does have enlisted personnel who are citizens of other nations.
Would members of your world in Starfleet Academy suddenly be held to non-member world standards?
We know that Ro was a Starfleet officer without Bajor being a part of the Federation.