Yes, with proper prep. Rust, mill scale, and paint all have to come off the weld zone before welding for the bead to bite into clean metal. We grind, wire-wheel, or flap-disc the area to bright steel before striking an arc.
If the rust has gone deep enough that there’s no sound metal left, the part needs replacing or a patch welded in. We tell you up front when we see that.