GUE instructors are absolutely prohibited from closing valves. My husband also tells me that PADI instructors are prohibited from closing valves. But it is not the case for all agencies.
I vividly remember a dive that began a relationship with an instructor that was incredibly developmental for me, Peter, and my friend Kirk. Kirk and I had already been through a completely unprecedented failure scenario we had not handled to the instructor's satisfaction. We then descended and I shot a bag and tied it off. Kirk moved off with the reel, and ignored the fact that I wasn't following him, because I couldn't -- my manifold had been wrapped in the upline. So, of course, Kirk got put out of gas, and came hightailing back to me to get some. I donated, and put my backup in my mouth, and there was nothing there. I had a moment of adrenaline rush, and then I looked at Kirk, who was clearly breathing off my right post regulator, so the only logical answer was that my left post was closed. I reached back and opened it, and felt enormously proud of myself for having thought the thing through.
It was a challenge with no precedent in my experience. I found it to be a growth event, causing increased confidence in my ability to cope with the unexpected. But I think you ought to know the people you are working with VERY well before you throw that kind of question to them, because I could easily have failed that scenario, and ended up in panic AND entangled. I completely understand why some agencies would prohibit the practice.