LONDON—Oil prices are trading at levels not seen since late 2014, defying what is often a considerable obstacle to crude and other commodities rallying: a stronger dollar.

A firmer greenback can make dollar-denominated commodities like oil more expensive for buyers who hold other currencies, thus reducing demand for crude and putting a cap on its price. This inverse relationship has been axiomatic for oil markets. But lately, bolstered by geopolitical risks to supply and shrinking global stockpiles, crude-oil prices have...