The simplest idea of turning a small electromagnet on and off does not work. An electromagnet has a field both inside and outside the coil:
(Image source: P.Sumanth Naik / Wikipedia)
The field outside the coil has the same flux as the field inside - it is just divided over a larger area. This is true for all types of magnets, except hypothetical magnetic monopoles.
With similarly sized magnets that are close to each other, the outer fields are wide and weak enough that their comparative effect is small:
(Image source: Geek3 / Wikipedia)
Because Earth's magnetic field is so large, it is essentially homogenous in the vicinity of a small electromagnet. Therefore the outer field will almost completely cancel any linear force produced by the inner field. This may sound a bit surprising, but applies in general: uniform magnetic fields do not generate linear forces. Only magnetic torque caused by the dipole moment remains.
In electromagnetic tethers the linear force is generated by electrostatic forces, while the required voltage is generated magnetically.