The main issue would be whether the seals will stand up to petroleum products - and then whether the additional contaminates of the dirty oil would further pose a problem. If the seals are merely rubber, oil is going to degrade them over time.

I can’t imagine trying to use the same pump for both dirty and clean oil. You’d spend an awful lot of time cleaning everything out before running clean oil through it.