Dynamical friction from ultralight dark matter