Like outlined in these steps:
- Open your Photos app.
- Select the photo or video that you want to hide.
- Tap the share button > Hide.
- Confirm that you want to hide the photo or video.
seen here https://support.apple.com/en-us/HT205891 So needs to hide and place images in the hidden album via Apples Photo App.
It can be a third app that does the hiding if I can do this via an apple API (I'd assume it would be Photokit) just cannot be storing in the third party app and removing them from the Photos app as a way of hiding.
I feel like if it was supported it would be documented here with how to favorite an image but dont see it so dont think it exists https://developer.apple.com/documentation/photokit/browsing_and_modifying_photo_albums