The short answer is yes, it's not only possible for someone to have a bowel movement during sex, but it happens probably more than you imagine. If you're surprised to hear this, consider how seldom we talk about sex honestly in our society, and how seldom we talk about bowel movements openly and honestly. Two taboos make for a lot of ignorance and fear. So it happens (I think there's a t-shirt to that effect), and while there are things you can do to reduce the chances of it happening, there are no guarantees. In the end, our bodies are full of liquids (and semi-solids), and when we really let our bodies relax, those liquids can sometimes leak out. It's often a result of intense pleasure, so while it may come with some baggage, in the end, many find it worthwhile to work through.
The specifics of bowel movements during sex are a bit more complicated. First of all, "during sex" means many things. It might mean during kissing, or oral sex, or intercourse, or anal sex, or fantasy role play. Do you mean when sex first starts happening, when it's almost done, or five minutes after it's over?
Some kinds of sex may be more likely to make you feel like you're about to have a bowel movement (or actually have one) than others. For example, if you're having sex in a position where pressure is being put on your abdomen, that might increase the feeling and possibility of having a bowl movement. Some people say that vaginal penetration in certain positions can make them feel like their bowel (or specifically, their rectum, which is much lower down) is full.
The chances of having a bowel movement during sex also depend on your body. As a result of many things (impairment, disease, surgery, medication, and more), some people have less control over their bowel function than others, and have involuntary bowel movements at other times. The stimulation from pleasurable sex can sometimes stimulate a bowel movement. Whether you have permanent or temporary bowel control loss, if you start having sex with a full bowel, or if you start already feeling like you have to have a bowel movement, it's possible to have a bowel movement during sex, particularly at the point of orgasm when muscles contract and the body goes from very tense to very relaxed in a short time.
If it happens to you once, it is probably not a sign of a more significant health issue, but if you're concerned, and you have access to a health care professional, it's worth asking them about it. It might feel like an embarrassing thing to bring up, but know that health care professionals are actually very comfortable talking about bowels and excrement (in fact, they usually get more training around that then they do around sex). If it's happened more than once, or regularly, it's probably a good idea to see a doctor.
There are some things you can do to reduce the chances of having a bowel movement during sex. Start by going to the bathroom before you have sex. If there's less in your body to come out, there's less of a chance that it will. If you have a regular bowel routine, you can think about timing sex to when you've recently emptied your bowel. Experimenting with positions that don't put pressure on your abdomen (you on your side, you on top), and with sexual activities that don't make you feel like you have to go to the bathroom is another obvious idea. Of course, all of this involves talking with your partner about sex, which can feel scary or embarrassing, but it will not only help with this particular situation, it may make the sex you're having more pleasurable in general.
Read more about bowel and bladder control during sex: