I'm not going to use the term "ergative" because I don't understand its exact definition and when it is appropriate (and as the comments mention, it has another definition, so it can be confusing to use this terminology).
Passive in form "verba communia"
Something that seems to match what you describe on the surface level is something called "verba communia". Apparently, for some transitive deponent verbs, an identical form can be can be used intransitively with a passive meaning ("Features, Syntax, and Categories
in the Latin Perfect", by David Embick, p. 194).
Embick gives the following example:
(11) Ab amīcīs hortā-rē-tur.
by friends urge-IMPERF.SUBJ-PASS.3SG
‘He was urged by friends.’ (subjunctive)
(Varro in Prisc., GL II 387,2)
Fraenkel 1964 cites Gellius as giving utor, vereor, hortor, and consolor as examples of "verba communia"; and testor and interpretor are also mentioned similarly.
To clarify a point that was brought up in the comments, I'm not claiming that this passive construction was productive or applicable to all transitive deponent verbs: I haven't seen a source that makes that claim. Embick says "some deponents like hortor may also appear in passive syntax".
Wright ("Passive morphology in Late Latin") mentions the alternative of analyzing the verbs used in this passive construction as forms of non-deponent alternatives to deponent verbs (e.g. horto) (p. 71, 77), which would imply that this passive construction should only exist for deponent verbs that had alternative non-deponent active forms. If you consider deponent hortor and non-deponent horto to be separate verbs, then hortārētur in Embick's example could be analyzed as only being a form of the second.
That said, I also feel like English break (tr.) and break (intr.) could be analyzed as separate verbs, so I'm not sure whether this disqualifies "verba communia" as an example of something similar in Latin.
Apparently, a similar ambiguity applies to the perfect participle of many deponent verbs, according to this Reddit post that quotes Gildersleeve 167 n. 2.