Yes - if you make oil, there are processes you can use to remove just about anything from it.
Make oil via whatever method you want. Then "winterize" it by diluting with ethanol in a jar, freeze it overnight, remove any ice, and pour through a paper coffee filter, then boil off the alcohol. Now you have a much cleaner oil. This also removes a lot of chlorophyll, plant matter and waxes. Of course every time you clean the oil, the yield will shrink ...but really you are just getting a more pure product.
More detail, compliments of Skunk Pharm:
https://skunkpharmresearch.com/getting-the-green-and-waxes-out-afterwards/
You can take this a step further too... Which is actually a process used to remove pretty much anything and everything including mildew and bud rot (and the spores) *and* from what I understand... most, if not all, of the gross flavor it produces as well.
Here is a quick rundown...
Cut the oil wayyyyy back down to a very thin liquid using ethanol. Obtain small micron syringe filters and related syringes online. Run the liquid through those filters, then boil off the alcohol again. You will be left with a very pristine oil.
Here is a much more detailed rundown, compliments of Skunk Pharm:
https://skunkpharmresearch.com/salvaging-moldy