Many therapists will allow patients to discuss suicidal thoughts, as they should. Therapists are required to intervene only if a patient expresses an imminent danger of harm to self or others. That would typically involve not just having suicidal thoughts, but also having a plan, the means to accomplish that plan, and an imminent intention to do so.
I agree that it would be very important to be able to speak your thoughts to an experienced listener such as a therapist or a hotline listener such as can be reached 24/7 at the National Suicide Hotline, 1-800-373-TALK.