Sometimes, but if the product has to be acidic, ultramarine is the wrong blue.
Ultramarine (CI 77007) is acid-sensitive and can decompose with release of hydrogen sulphide, which shows up as odour and fading. The acid sources in a real formula are broader than people expect: AHAs, salicylic acid, vitamin C and its derivatives, some organic-acid preservatives, and any emulsion running at low pH.
Three routes, in order of reliability. Keep the system neutral to mildly alkaline and confirm the actual window by compatibility test rather than by guesswork. Keep the acid actives in a separate phase where the format allows. And run an accelerated sample — 40°C for a month plus light — checking for shade shift, gas and odour.
If the concept is inherently acidic, switch to an acid-stable blue: certain organic blue lakes, or iron blue, each of which needs its own permitted-use check for the market and the application area.