U.S. sanctions have driven the price of oil and the ruble apart—leaving Russia with expensive crude and a cheaper currency, a combination that is helping its economy.

The price of oil, Russia’s main export, has risen almost 14% since mid-August. This is largely because of the coming resumption of U.S. sanctions against Iran, choking off the supply of crude from that country.

Meanwhile,...