All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad is His slave and Messenger.
Your situation is one of the two following:
1. If you pass wind in a natural manner in a way that you can keep your ablution valid for a time that is sufficient for you to perform ablution and the prayer, then you are obliged to perform ablution and pray at this time even if this leads to missing the Friday prayer; in which case, you should pray it as Thuhr [4 Rak'ahs]. There is no harm on you in attending the Khutbah while not in the state of ablution.
2. If passing wind is continuous, in a way that it does not stop for a period during which you may perform ablution and the prayer, then your ruling is similar to the person who suffers from incontinence of urine.
In this case, you should perform ablution for each prayer when its fixed time starts and then pray the obligatory prayer and any supererogatory prayers that you wish.
In this case, you are obliged to perform the Friday prayer as we mentioned to you and attend the Khutbah, and it is not permissible for you to pray Thuhr prayer instead of Jumu'ah [Friday] prayer.
For more benefit, please refer to Fatwa 82085.
Allaah Knows best.