Hard to say for sure from one photo, but I would not weld that bar back on until you know exactly what it is doing and why it broke.
If it is only a light guide/guard, a good weld repair might get you by. If it locates the adjuster, keeps the idler aligned, or carries any track-tension load, I would be much more careful. A failed repair there can let the track walk or damage the recoil/adjuster parts.
A few checks I would make first:
1. Back the track tension off safely and inspect the recoil/grease adjuster, yoke and mounting ears.
2. Check the idler shell, shaft and bushings for side play. If the idler is already moving sideways, welding the bar back on will not fix the cause.
3. Look at track-frame alignment and track tension. An over-tight track can load the front idler hard.
4. Clean the broken area enough to see whether the crack runs into the idler structure itself.
If the base metal is cracked into a load-bearing area, I would price a used or replacement idler. If it is just a non-critical guide and the rest of the idler is tight, a qualified welder can probably make a temporary repair, but I would still keep an eye on track alignment after running it.