The defence secretary's comments came after US President Donald Trump told other nations to "go get your own oil".