Can (and should) an editor referee a paper he's in charge of? I have reason to believe that the editor assigned to a paper we have recently submitted might have also acted as referee.

I am of course not sure because reviewers for this journal are in principle anonymous (as is standard, at least in my field). So I want to make clear this is not an accusation or even a complaint - the report sounds very reasonable anyway.

However, this has made me wonder: would it be appropriate for an editor to referee a paper that he/she is in charge of?
That editors occasionally act as reviewers is not uncommon. This does not mean it should be the norm, quite the contrary. As an editor (in Chief), I have on occasion stepped in and performed a second review when I have felt that it has been needed to speed up the process for a paper, most often because of a lack of response from reviewers that have once agreed to review. In addition, I would only take on paper where I have the specific expertise.

Stepping in do perform reviews as an editor requires attention to the roles of reviewers and editors and I feel it is important to let the authors know that I have stepped in to do the review and also why. Since, I as an editor have the final say in advising the authors on how they should revise their manuscript, for example by valuing the reviewers recommendations into a reject/major revision/minor revision/accept decision, adding own opinion to the mix is not as far reaching as might be thought. It is not unheard of that editors may look away from reject or accept recommendations based on information not observed by reviewers, but as rare as such instances are, should the intervention of an editor in the review process be. So in conclusion, yes, editors can add reviews but should do so with extreme caution and rarity.