Whilst no one can stop you cutting through a joist, it is difficult to do so for a 40mm waste pipe and comply with Building Regulations. Bear in mind that in a bathroom, the imposed loading on the floor is one of the highest in the property - for a full bath around 350kg over 4 or 5 point loads. So weakening a joist under a bath is not the best of ideas. The joist will probably not fail, but the potential for the floor to flex will increase, as will the risk of cracking in the decoration below.
A built in beam ( which yours are not) are more forgiving to cuts in the lower centre section - however, Building Regulations would still mot a allow a hole to suit a 40mm waste in joists of the depth you have.
Your beams are simple (rather than built in)
joists on hangers. If you have time, lift the flooring for the length of the joist, then drop in ( on steel plate hangers) a second joist in parallel - but offset by 3 to 4 inches.
That allows you to cut through the first beam into the side entry spiggot, without compromising the strength of the floor.
Ideally you prepare the new beam, but make the cuts and pipework connection through the existing beam, just before you drop in the second beam - you have better access that way.
Cutting and strengthening a plate hung timber joist is quite difficult. The area at risk is the bottom section which is in tension - so this normally requires a second short beam or steel plate to be bolted onto and through either side of the beam before you cut through - you don’t seem to have the space to do this.
Hope this helps