Your copy of an app will never be taken from you.
This applies to both free and paid apps. Of course, it will no longer be updated, so if any compatibility issues or bugs arise in the future you will be on your own.
What I don't know, though, is whether or not Apple keeps a copy of the app on its servers for redownload/restore purposes, so if it's an app you really care about I suggest keeping a backup of the .ipa file so that you can restore it manually if you ever need to.
If you have a Mac, here's how to make a manual backup (instructions for iTunes 12.5):
- Open iTunes and choose Account → Purchased from the menu bar.
- Click the Apps tab on the top-right corner if necessary.
- Find the app you want to keep a backup of and click its download button if there is one. On this screenshot, I have already downloaded a copy of Tiny Wings and do not have a local copy of Super Mario Run.

If you don't see the app in the list, try switching between "All" and "Not In My Library."
There's also a handy "Download All" button in the lower-right corner.
- Once it's downloaded, it will be captured and saved in the next Time Machine backup.
- If you want to get to the actual .ipa file, it's saved in ~/Music/iTunes/iTunes Media/Mobile Applications.