The Romans did have other military soldiers besides the legions, like Auxillaries and Velites. They probably could have the Legions be trained in ambious roles, but more complex stuff(like Navy Seals) would likely need a different unit. Another possibility is that Rome would organize the Legions according to role. Like #1 threw #3 are GI, #4 threw #6 would be Marines, #7 to #9 would be Special Ops etc.