Sure you can. Apple does not run its image classification on your images using its cloud servers. You can test this by stepping inside a microwave or other cage and seeing that image classification and search still works on the iPhone.
---
On the other hand, what Apple does with your photos that you allow to be exfiltrated through iCloud... that's your own stupid fault.