they actualy can be out for quit some time but they can dry up quickly there has been reports of octopus climming out of tanks and stealing fish from another tank then going back to the old tank amaizing
Its not an urban legend, it's been documented before. Plus my friend has a picture of his dead octo in his goldfish tank. And no, he didn't put it there!! ( that's what he told me anyway...)
Well, the length of time it could stay completely out would depend on the environment. It basically has to ensure that it doesn't dry out and can get oxygen. One documentry mentioned "up to 10 minutes" so i'll go by that.