Some time ago, I was assigned by upper management to work on a project with a client of our company. As the project progressed, the client became upset that our company hadn't assigned anyone else to work on the project (apparent this was explicitly stated in the contract). When I relayed the client's concerns to our management team, they just deflected by saying "the client shouldn't be addressing that with you." I then pressed them to explain how they would like communication to work with this client. They asked me to just tell the client to contact them with any such concerns directly. I then relayed this back to the client.
The client then attempted to contact our management team and didn't receive any form of response. The client became even more upset and I again relayed the concerns of the client to our management team. They responded in the same way as before leaving me in a position of not being able to deescalate the situation with the client.
Recently, a member of our management team mistakenly included me in an email thread and there was a discussion between other members of management that basically stated they had no intention of seeing the project through to completion, they just wanted to create the illusion for the client that we were actually working on it. That explains why management wasn't communicating with me in regards to the project and why they weren't responding to the client.
The individual who mistakenly included me on the email immediately realized it and warned me that email was confidential and I was not to discuss it with anyone. Because I felt this presented an ethical issue, I scheduled a meeting with upper management and told them I cannot proceed working on this project if there is no intention of seeing it through. I was then warned that my job is at stake and the meeting was ended.
I am a bit confused as how to proceed from here. It's obvious that I need to leave my job. My question then is is it advisable to quit immediately or stick around to let things play out? Do I have any obligation to inform the client of what I have discovered about this project?