It will not help if your failure mode is the shear strength of the wing skin being exceeded, because the moment of torsion will act everywhere along the span, also between the ribs. In this case you will have to make the skin thicker or increase the cross section of the wing to reduce shear stresses. In this case, making the foam core of a composite skin thicker will also not help, because the core does not carry any (or barely any) load
If your failure mode is buckling of a section between ribs, then adding ribs will help, because they would make those sections smaller and more resistant to buckling. Increasing the core thickness of a composite skin will also help against buckling.