If this is new, then get it checked!
I'm afraid bowel incontinence is something I have had to cope with occasionally. I have had IBS since I was a teenager. When I go out and am anxious about it, I wear a sanitary towel, which can give me a chance to get to a loo without soiling my clothes and gives me peace of mind. I was advised to take Immodium the night before something important, or where access to a loo is difficult, such as flying. I tend towards constipation, but things can swing very much the other way. I find Immodium used sparingly does not cause constipation. Hormones have always played a part. Symptoms always flared up during a period and the menopause has made things worse. Last accident was a few weeks ago while taking ABs.
What has helped me is fybogel, 1 sachet a day if I have diarrhoea (helps to regulate) and 2 for constipation. Also I check any persistent bowel changes with the doctor for safety and reassurance. Oh, how I love the days when my bowels function normally and I don't have to think about them or where the loo is. Oh and it is usual to have an irritated bladder while your bowels are irritated.