If you cut the top rail, add catches to the ladder, and weld-in vertical tubes to the mid-level rail that form a 90-degree corner to the remaining rail stub ends, then you have a rigid setup and you don't need to add full stanchions.
You could use a sliding barrel-bolt concept on each side of the rail to connect ladder's bottom rung.