No, Ditto cannot be caught in raids. It can only be encountered in the wild by catching Pokémon that may potentially be Ditto in disguise.