Extending a paper being peer-reviewed?
I am hesitant with this question because the ethics of the fact that you are in a position of authority over them and what you do could affect whether or not they are published. The point of research is to advance the field, so by reading their paper, you have had a reactionary idea that will advance the field even more. So, I vote to mention it in the review and see if they pick up the idea, if advancing scientific progress is truly what you are worried about. If they don't do anything with the information then go ahead and develop it yourself.

Otherwise, you risk rejecting them for personal gain, on an idea that you said you haven't even implemented or tested yet, something that they have done.