Soliciting pre-submission manuscript comments from people who could later be peer reviewers
I see no problem with refereeing a paper after I've commented on it to the author. I would tell the author what (if anything) I think would improve the paper, and I would tell the editor whether I think it's appropriate for the particular journal and if so then what (if anything) would improve the paper.  There have been cases where an editor asked me to referee a paper and wrote, in his cover message, that he knew (because of acknowledgements) that I'd already read the paper, so it should be easy for me to referee.