The CSAM scan would not be enabled if you had iCloud Photos turned off. All it did was move the scan on-device, it still only ran if those photos were destined for the cloud.