With $wgFragmentMode=['legacy']:
$ echo '<sup id="cite_ref-{|a}}_1-0" class="reference">[[#cite_note-{{echo|a}}-1|[1]]]</sup>' | php maintenance/parse.php <div class="mw-parser-output"><p><sup id="cite_ref-.7B.7Becho.7Ca.7D.7D_1-0" class="reference"><a href="#cite_note-.7B.7Becho.7Ca.7D.7D-1">[1]</a></sup> </p></div>
But with $wgFragmentMode=['html5','legacy']:
$ echo '<sup id="cite_ref-{|a}}_1-0" class="reference">[[#cite_note-{{echo|a}}-1|[1]]]</sup>' | php maintenance/parse.php <div class="mw-parser-output"><p><sup id="cite_ref-{{echo|a}}_1-0" class="reference"><a href="#cite_notea}1">[1]</a></sup>
Note that the href attribute in the second example is double-decoded: the HTML entities are expanded to {{echo|a}} and then that appears to be processed again in some way to yield a} (and a single dash is removed?).