wa'alaikum as'salaam,
As stated by azc, if it's something requiring a doc's visit then do that. Otherwise, it maybe just a bloated issue.
otherwise,
the ruling on urinary incontinence and continual passing of wind is the same as the ruling on istihaadah (prolonged non-menstrual vaginal bleeding). Urine, wind and vaginal bleeding all invalidate wudoo’, and Allaah says (interpretation of the meaning):
“Allaah does not want to place you in difficulty, but He wants to purify you, and to complete His Favour to you that you may be thankful” [al-Maa'idah 5:6]
“Allaah intends for you ease, and He does not want to make things difficult for you” [al-Baqarah 2:185]
So people suffering from these problems are allowed to do wudoo’ for each prayer when the time for that prayer has begun, then they should pray as they are, even if some wind, urine or blood comes out of them whilst they are praying.
This ruling is for one who passes wind continually. If that is intermittent, and he can do the prayer during the time when it stops, then he has to do wudoo’ and pray at the time when the wind has stopped.
for more info see,
https://islamqa.info/en/22843 and
https://islamqa.info/en/8910
The hadith goes as such,
It was narrated from ‘Abbaad ibn Tameem that his paternal uncle asked the Messenger of Allaah (peace and blessings of Allaah be upon him) about a man who thought he felt something whilst praying. He said: “He should not stop praying unless he hears a sound or detects an odour.”
no mention of any gas problems or entrapment. unless there is sound or detection of odour, there's no need to worry about it inshallah. If you are feeling bloated and as such then glass of water with 2-3 tablespoons of apple cider can help.