The compute model and I believe an old style model A have been made to work in device mode. A long while ago with a lot of hacking. I believe it is part of the standard that a USB OTG device should check what order the pins are pulled high and low so to know if to select device or host mode. If that is the case then it is just a layout of the board and using the correct resisters and connector.
If they have done this then it is just a software issue and would be ace to plug the RPi and have it show up as a USB network gadget device and a USB storage device. This has been done for years with pricey OEM dev kits.
If they have not but I am correct about the wiring, someone could hack it up.
Yes, in theory USB OTG and using the Pi Zero as a host or gadget is possible (just as it is on model A and CM). Not sure if anyone has got that working?
On Pi Zero the OTG line is used and makes the linux driver choose host/gadget mode. However as most people want host mode, and non-OTG cables make the Pi Zero boot in gadget mode, we ignore this.
You can revert this commit
to make OTG switching work.
However that is not sufficient. The USB driver hasn't been tested in gadget mode by us for about 3 years, and certainly some of the FIQ stuff doesn't work with gadget mode.
Some some hacking would be needed (starting with disabling the fiq) to make this work. Volunteers are welcome!