I went to validate, and Dispel Magic and Greater Dispel Magic count as valid self-target spells for both Brew Potion and Brew Elixir, respectively.
You can use them to target yourself or allies, so that checks out, but on-use it gives you the standard spell-targeting selection thereby allowing for non-self use.
This is pretty much the case for most modal spells like that, since the potion generator system just gives a single use of the spell, rather than locking it to full potion use rules.
I like to think of them as spell-bombs. Chuck the bottle at the enemy.