Both characters need to be in a major city. This answers nearly all of the questions. Generally speaking, if you tack on "all done while the alt remains in a major city" it is not allowed, because it means you are talking about the main character being outside the city and either levelling, doing a raid, etc. That would violate the ToU.
So given that the context of the OP's question, it would not be allowed since the implication is that someone asked you if the guild bank had something, and your character was not in a major city. You would want to log out of that character and log into the bank alt to check. The way to solve that problem is (as the OP suggests) to create an addon that allows you to import inventory into an excel spreadsheet, or that just displays inventory of other players in the UI. Altoholic was a retail addon that did this exact function.
One player in this thread asked about being in a raid, and also about using an alt to reset an instance. You don't need to break the rules to do either:
- You can form a raid with both characters in a major city, then log out of one of them. The other will still be in a raid then, and you can take the character to the raid instance.
- For resetting instances: use /script ResetInstances(); on the command line (typed exactly that way, including the semicolon.) Then you can /camp, and you will be ported outside the instance upon logging back in with the instance reset. Many DM East farmers do this.
- Alternate way to reset instances: Take off your gear, then deliberately die, and run back. While running back, use /script ResetInstances(); -- thus resetting the instance while you are dead and outside. This is useful on the PVP server if you want to avoid the gauntlet of players ganking DM East farmers for example. It can sometimes be faster to run back from the graveyard than to make it back to the entrance of DM east from the DM west entrance.