It would be nice if UID
is write-protected so that I can use it to detect card clones.
So, can it be modified?
Yes and no. The standard Mifare Classic has a locked sector 0, where the UID is stored. However, if you Google changeable uid mifare, you'll find several (comparatively expensive) cards for sale with sector 0 unlocked.