In Minnesota, owner occupied properties have a right of a 6 month redemtion period, which menas that the property still belongs to the owners.
If your offer was submmited before Sheriff Sale, listing agent should request to postpone the sheriff sale and wait until Short Sale approval is done.
Countrywide is a very slow Short Sale servicer.
If your offer was under redemtion period and nothing is approved by the end of the redemtion, then you are correct, property will go to foreclosure. Once it is a Bank Owned property / foreclosure, you re start the process all over. Sometimes, the listing agent could try to talk to REO management and let them know that there is a willin buyer but it is not very possible it will work.
Also, your financing, if any, could have issues if the property has been winterized.