Ditto can never pass on its Hidden Ability by virtue of not being able to produce Eggs.
In Generation V, a Hidden Ability may be passed down by the female if it is bred with a male. A female breeding with Ditto won't work; neither will any male or genderless Pokemon. This is probably where the other answer got its information from, but it's not true in any generation after the fifth.
Starting in Generation VI, any Pokemon bred with Ditto has a chance of passing down its Hidden Ability, regardless of gender. If two non-Ditto Pokemon are coupled, only the female may pass down its Ability.
Inheriting Abilities | Pokemon Breeding (Bulbapedia)