No, they are definitely still compatible. Pokemon can produce unlimited Eggs. What did the Day Care man tell you? If he said "the two prefer to play with other Pokemon rather than each other", then the Pokemon are incompatible. If he said anything else, then they can breed. It doesn't matter if he says they don't like each other, all that means is that they won't breed as often.
How Egg production works is that every 256 steps, there is a chance that the Pokemon in the Day Care will breed. If they are incompatible Pokemon, the chance is 0. If they are compatible (like Ditto and Castform are), then the chance is higher than 0. The chance depends on the species, the Pokemon's OT, etc.
The Day Care man is just slightly misleading with what he says. As stated before, if he says "the two prefer to play with other Pokemon rather than each other", it means the chance is 0. If he says something different, they are compatible. Even if he says they don't like each other, they will breed eventually. The chance per 256 steps is just lower.
Specific chances for Eggs can be found here. Assuming Ditto and Castform were both caught by you, their chance of breeding every 256 steps is 20%.