Thanks. Wikipedia [1] says you’re right, and also offers me a small condolence that my misconception is fairly common: “Ambergris is usually passed in the fecal matter. It is speculated that an ambergris mass too large to be passed through the intestines is expelled via the mouth, leading to the reputation of ambergris as primarily coming from whale vomit.”
[1] https://en.wikipedia.org/wiki/Ambergris#Formation