καὶ πρὸς τὸ μάχεσθαι, εἴ τι δέοι, ἐπορεύετο.
This opt represents Cyrus’s thought ’ if it is necessary,’ like subjunctives in Latin.
“if something should be necessary” or “in case something should be necessary”
I think there is some ambiguity here, for it may also replace subj. with an.