Before Family Sharing, you could take someone else's iOS device and sign in to the app store with your account and download all/any apps you choose.
At that point, your password was needed to update, but signing out didn't delete the apps or in any other way prevent them from working. Let's set aside in-app purchases for the time being.
Family sharing changes this in that when someone joins the "family" - their Apple ID is used to download and update other family member apps. They do not show up in your purchases, they show up as the other named family member's purchase. All that changes is the password needed to install and update.
When you as a family member remove yourself from the plan - you get a warning that lists what will happen and basically, you immediately lose access to the purchases, photos, calendars and other items that were shared in the plan.
Rejoining the family would then let you re-download and re-sync the items.
You'll probably want to find a better way to use the family service than routinely joining and leaving or skip the family share and use the older method of signing in to multiple devices which doesn't immediately remove/revoke the items.
I also shared my Apple ID with my wife for app purchases, and found the transition to Family Sharing painless. This Apple support page goes into details, and I'll answer some of your specific questions below.
What will happen to her existing apps, some of which have saved local data?
Most likely your wife's iPhone is set up so that iCloud (Settings > iCloud) is using B's Apple ID, and iTunes & App Store (Settings > iTunes & App Store) is set up with A's Apple ID. This makes the transition easy, but just in case please make a full encrypted backup with iTunes.
On your wife's iPhone, go to Settings > iTunes & App Store > Apple ID and click "Sign Out", reboot the iPhone, and then sign in with your B's Apple ID. A should then create the family group and invite B to the group.
The existing apps might still be marked as "purchased by" A. If my wife wants to update them, she'd need to enter the A credentials
The linked answer describes how app authentication works when there are apps purchased under multiple Apple IDs on the same device. The authentication process for Family Sharing works differently.
Under Family Sharing, account B's credentials will be valid for purchases shared by other family members if she has been flagged as a Parent/Guardian by the Family Organizer. This includes apps, music, movies, and iBooks. To download apps made by other members, open the store app that you want to download content from, and go to the purchased page. On iOS devices this is located at:
App Store: Tap Updates > Purchased.
iTunes Store: Tap More > Purchased.
iBooks: Tap Purchased.
The only time that a purchase needs to be authenticated is when a child that has be set as "Ask to Buy" tries to make a purchase.
Best Answer
This Apple Support document answers your query:
i.e., you will have 28 days of grace period to get a separate plan and keep access to your data.