You are thinking of ambergris. It is not legal to trade in
ambergris in the US. It was used as a fixative in many perfumes. It
starts out as a greyish material that smells of marine faeces, but
sweetens when it dries to resemble the odor of alcohol. It is not
harvested directly from whales so whales do not have to die in
order for it to be collected and used. It is still legal in France
and Switzerland. So it is possible that depending on the origin of
the lipstick, it may contain ambergris, or as you colorfully call
it, whale puke. But I think that it is used most often in high-end
fragrances rather than in other kinds of cosmetics.