Obviously Starfleet is a military organisation.
Its organisational structure mimics (if not exactly copies) Earth military structures. It has
officers, enlisted people, uniforms, people say yes sir and no sir to each other and salute.
If it looks like a duck and talks like a duck is it not a duck?
What I believe Scotty is saying (while knowing he is in the military) is are they going to go on military missions from now on, is the war (presumably with the Klingons) about to start? He's hoping or been led to believe that they'll be going on missions of discovery, or rescue, and so on, not ones with secret missions with illegal weapons on board.
If Picard said Starfleet is not a miltary operation then I think military means something different in the 24th century. He's in charge of a vessel that can destroy or save planets at the whim of an admiral.