The Disk Cleanup tool (shown in your screenshot) uses DISM in the background. If it's scanning, or was recently used to scan, or making changes, etc. it can cause other DISM instances to display that error.
Close all instances of the Disk Cleanup tool and try the DISM command again.