Is it okay to disclose papers under review for feedback on the review? One of the "learning outcomes" of PhD studies is to be able to critically evaluate a piece of work (for correctness and significance). Further, PhD students are expected to learn to conduct a proper peer review.

Under that aspect is it okay to disclose the paper you are asked to review to your group to get feedback on how to improve your peer review? The same goes for professors so that their PhDs can learn how to become better in writing / conducting reviews.

On what scale is this okay and not okay? 1o1 with a student and the supervisor? Within a group? A department (in a journal club style perhaps)? [If none, how do you learn this efficiently?]
As you say, it's part of the process of getting a PhD to learn how to conduct peer reviews, and working off templates and examples is only so useful.

I would however say that maintaining the confidentiality of the review is paramount.

Were it my own paper that was being reviewed, I'd have no problem with it being discussed 1-on-1 with a student and their supervisor, or within a small, lab-group setting. Wider distribution than that would start to make me a little wary - essentially, the wider the circle, the harder keeping the review in confidence becomes.

Another technique is to review already published papers or pre-prints as if you were peer reviewing them. This is commonly a format for journal clubs, and helps you learn the process in a way where confidentiality isn't a concern.