Dirt (or dust) on film produces erratic specks visible on the resulting scanned image.
Can it be fixed?
Yes. Film would have to be cleaned of debris and re-scanned.
Restoration softwares allow to mask dirts up to a certain degree, so they become invisible for humans. This may be useful when the analogue source is no longer available.