It sounds like your X-BF is in the right place. We only can hope he takes advantage of this opportunity to be open and honest with the hospital staff and begin to deal with his real issues. Whatever happens, you have to remember it's not your job or responsibility to fix him. He has to take that responsibility for himself.
I would also suggest that you are in a very difficult position here. You have broken off the relationship for good reasons and he is dragging you back in. I know that you don't want to break any confidences, but attempting suicide, as you well know, is a very serious and desperate act. Personally, I would call the doctor and tell him that you had a very short relationship with him and have broken it off. That you don't want to become too much involved but have some information that may be valuable in treating him. Tell him that your ex-BF recently confessed to incest and that you would appreciate it if your name was not mentioned. Whatever happens in the future, you know that you gave the information to a professional that was in a position to help him, in good faith.
You may also want to consider setting up an appointment with a therapist for yourself. This is a very painful and confusing situation and getting a objective professional opinion would not do any harm.
Recovery is Possible!