Deleting Photos from iPhone and iPad
You can achieve this in two ways:


Deactivating the "iCloud Photo Library", which links the photo libraries in every iOS / OS X device you own and have configured under the same Apple ID and automatically syncs every picture taken, added or removed to all the devices on the system. With the setting inactive, you can work in the "classic" way, by downloading the images of each device to your main library and then emptying your iOS devices. You won't get the alert because the libraries will no longer be synced.
Keeping the iCloud Photo Library on and activating the "Optimize [device] storage" setting under Settings > iCloud > iCloud Photo Library which will keep a full resolution copy of your image on iCloud and on the devices that don't have this setting on –your Mac, probably– and leave a lower resolution copy on your phone or any device with the setting activated. A higher resolution copy will be downloaded on demand if you open the picture later on.




Check the explanation Apple gives on the matter here: https://support.apple.com/en-us/HT204264

It's important to note that this will change the experience when browsing pictures on the Photo app a little bit, as each time you look at a picture in full screen it will begin downloading a bigger copy which will have a little delay; expect an increased use of your bandwidth and depending on your settings, of your data plan. Also, depending on the size of your Photo Library, you may fill the 5GB free plan and be asked to pay a monthly fee for an increase in your iCloud capacity.