IF the airliner has HEPA filtration yes, so pathogens floating in the air that happen to get drawn into the recric system would be trapped and not recirculated, so some of the total pathogen load in the cabin, but not all, would be removed. In theory, if you just added a fixed amount of pathogens at the start and just let it run, the concentration would slowly decrease. Problem is, if there are sick pax on board they are continuously issuing them, so the filtration is only a mitigation.
If an airplane doesn't have HEPA filtration, effectively, forget it. There are HEPA elements made for older airliners with existing recirc filters under PMA that are a direct replacement, but you won't know which airplane you're on has them. Maybe you can ask when a book a ticket.
In any case, I said "only a mitigation" because the pathogens you are going to be exposed to on the flight are all around you in the cabin and what may be removed by the recirc system really isn't going to help you all that much. If you catch something it's usually because you touched a contaminated surface and then touched your face at an entry point, like the eye, after.
This is why wearing face masks can help in preventing breathing in a pathogen directly, but you usually don't acquire them that way anyway. When you catch a cold from someone in the office, it's rarely because they coughed in your face; it's because you touched something they touched, or coughed on, earlier and then rubbed your eyes or scratched your nose.
People who are very disciplined about never touching anywhere near their faces with their hands probably have the best protection from catching these kinds of things.