Sure, you can! This is called offloading. Offloading an app allows you to delete an app from your iPhone while still retaining the data and documents of the app.