My thought process is that there is very little friction in space minus gravitational pull. Which could be a good thing if you wanted to go faster or slow down. The question is, is it possible to have a stong electo-magnet and grab onto the magnetic field of a random mass and use it to coast? Or to push away from the magnetic field of an object that is closer given that its gravity doesn’t pull you in?
So the short answer here is yes you could. However, there's not a justifiable advantage to using this. To propel yourself, you would constantly need an incredibly strong magnetic object near you. Now, electromagnetic forces are significantly stronger than gravity, but the extent of positive or negatively charged objects are relatively scarce. Additionally, the magnetic orientation of objects is also incredibly weak in general. Earth's magnetic field is 25-65 µT. To put that in perspective, a fridge magnet is about 1.5 mT and an MRI machine is about 1.5 T. This means that any force you could generate would be relatively small in comparison to the conventional Liquid Hydrogen and Liquid Oxygen reaction used. I can try to get the energy numbers if you need them, but I don't necessarily know how to go about calculating it properly. Regardless, the strength is likely 4 or 5 orders of magnitude ($10^4$ or $10^5$ times) weaker than conventional thrust methods.
Magnetic "sails" have been proposed, that would achieve thrust by deflecting charged particles in the solar wind with the magnetic field of a superconducting loop. Also possible to deflect off solar and planetary magnetospheres.
I don't have any way to judge the feasibility. What I've read suggests they would need higher temp superconductors than currently available, at least in the inner solar system. It sounded like the current should persist in the loop.