you have to have a male or female with the hidden ability you want then theres an 80% chance breeding with a ditto that said baby will have the HA having a HA ditto has nothing to do with it at all. the only reason people want friend safari dittos is because in the friend safari any pokemon you catch has at least 2 perfect IVs
Black 2 FC: 4728-5821-6276 3DS ACNL PKMN X: 1633-4186-0303
The partner needs to have it's hidden ability to pass down with Ditto. I've had about even luck with male and female breeding with ditto, so gender doesn't seem to impact the likelihood of passing the HA down.
3DS friend code: 0130-2567-2347 ACNL Town: Oa Gotta catch'em all!