It should be noted that Asian and African elephants are very different species. When you think of a friendly elephant who lives with a trainer for many years and are very helpful, working animals, those are Asian elephants.
If a wild African elephant sees you, it might very well chase you down to kill you. The effort to domesticate and train African elephants only began with the Belgians in the 19th Century. So while it *can* be done, it isn’t easy. The end result will be a trained *wild* animal, like a trained lion.
Yes, there were elephants in Vietnam and they occasionally interfered with combat operations.