Hmm. If you have enough support around it I don't see why not. I don't know how ergonomic it would end up being, though.
A quick search indicates it's been done. Obviously modern pistols are like this, but also mentioned are the Sten gun, MAT 49 and most eye-catchingly the TKB 022.
Yes, in general it is not a good idea for the magazine to be moved around by your hand. The welrod does this, but it is manually operated, so the reliability of the magazine is not really a concern:
It is presumably for this reason the wartime manual for the Sten gun specifically instructs soldiers not to use the magazine as a support grip: