Can an aluminium frame rust from the inside if water has been in it for some time? My bike has been sitting out in the open for a few months due to lack of space. When I finally decided to strip it down and bring it inside, a lot of water came out of the frame. It could have been sitting there for a few months. The chain and the cables have started to rust but that's an easy fix. I'm worried if the frame could have began to rust from the inside and should I expect it to break unexpectedly in the future?
Technically rust is limited to iron.   What is bad is the rust starts and continues.  The water / oxidizing agent is not consumed.

Aluminum will oxidize but it forms a protective coating.  An aluminum frame will not "oxidize out".

Some iron alloys such as stainless steel prevent rust.  I don't know why you don't seem to see stainless in bicycles.