Either the property is in someone else's name, and the bank refuses to speak to you or it is in your name and someone else's (like your angry uncooperative ex) and the bank will speak to you but then requires the cooperation of your uncooperative ex to actually do a modification. Some attorneys will not take these kinds of cases. You may have been rejected elsewhere.
Technically, the non-judicial sale process for co-ops isn't "Foreclosure" at all, but for convenience sake I will use the word "Foreclosure".
Co-ops are generally thought of as real estate, but legally they are not real estate. You own shares of stock and you have a Proprietary Lease. All of this sounds theoretical but the real-world consequence is that your co-op can get foreclosed much, much FASTER than any piece of land can be. This is because Co-ops are subject to Non-Judicial Foreclosure. The court process greatly slows down the foreclosure of land. With a co-op they do not need to take you to court at all. The Lender will move quickly
Some municipalities, like New York City, instead of foreclosing their own tax liens SELL those liens to investor groups like JER (formerly known as JE Roberts) and XSpand. After this happens the taxpayer owes those delinquent taxes to the private investor group rather than the municipality. The investor group then does either a workout or forecloses. Besides New York City JER is active in Buffalo, Binghamton, Syracuse and other upstate cities
On rare occasions one comes across a scenario wherein the homeowner has a lis pendens (a/k/a Notice of Pendency) filed against their property by someone they've never heard of. The Homeowner has no problem with mortgage (they may not even have a mortgage) or taxes, but they are getting tons of mail from people who got their name off a list of lis pendens. It must be some mistake.
How an Attorney Can Help: Maybe it is a mistake. Maybe someone was staying up late into the night preparing lots of lis pendens and they entered the wrong block and lot number and this thing really did get filed against you by accident. Still, its a cloud upon your title, which can interfere with selling or refinancing your property until someone can make it go away. A simple mistake like that should be fairly simple to resolve.