In my field (chemistry), review is always done in a single blind process, i.e. the author does not know who the referees were, but the referees do know who the authors are. In ten years, I have never seen a referee breaching this anonymity, e.g. by signing their review, unless they got prior approval by the editor (in order to continue discuss things further with the authors, once the manuscript was accepted for publication).
So, it seemed logical to assume that in single blind peer-review, the reviewer should not disclose his identity without the editor's consent. Yet, some people have told me (here and there; also IRL a friend from human sciences) that they have seen people sign their reviews, or write emails to them after the review but before the paper is published.
So, in single-blind peer-review, can you reveal your identity without the editor's consent? Does it depends on the customs of each field, or is there a hard rule? (in which case, the few anecdotes I heard were outliers)