Can bankruptcy stop a foreclosure sale?

Yes, when a Chapter 7 or Chapter 13 case is filed an automatic stay is instantly put into effect. The automatic stay is a federal law that stops all forms of collection activity, including foreclosure auctions already scheduled to occur.