The rear triangle (seat stays and chain stays) are the thinnest tubes, and often are subject to a lot of flexing even in normal riding.
If one breaks anywhere along its length – or, more likely, pulls apart at a weld – then although the bike will handle really poorly and your shifting may not work like it should, the bike should remain rideable as long as you are careful.
To strengthen the broken area, find a suitable object to either space the frame properly to hold it apart (between the seat stays where rear rim brakes attach, between the seat and chain stay if the dropout weld failed) or hold it aligned (along the length of the seat or chain stay). Now wrap it thinly with inner tube, then rope or zip ties – checking wheel, chain and derailleur clearance as you go.
Before you embark on a major fix, check that areas around the broken area are not also cracked. Also check the opposite side. If one section of the rear triangle has failed, it is likely that there were increased stresses on another part of the frame that compensated.
If everything else looks solid, carefully ride the bike out, dismounting for any technical sections.