Yes, you can, as long as they are in the same egg group. The thing is, Ditto can Transform into any Pokemon, male or female.
They need to be in the same egg group.
How to change your username
How to add a user avatar
Why was my post hidden?
Flags vs Downvotes
Official PokemonDb League
Type a Pokemon name, type, move or ability to see instant results.