Commercial engines can be placed on military ships. The commercial designation indicates that they don't force the ship to be military, not what the role of the ship was. (Think of the Bugs in the Starfire books by Weber and White.)
A different way to say it is that any military system placed on a ship will cause that ship to be classified as military.
John