Not wrong in principle, but not necessarily good in practice. I find "Was it wrong to want someone to talk to?" uninteresting because the correct answer is so obvious. Julie highlights nicely the possibility of building conflict, drama or intrigue into a short rhetorical question.
Actually she gives two variations. Her first example implies that the POV character has already done something inadvisable. Another example might be "Was it wrong for Paul to poison little sister's hamster?" - implying Paul has committed, or is planning, this crime.
The second example works by implying that the character desires something that most people would judge wrong: wanting a friend to fail. There's a built-in contradiction - what sort of friendship is that?