The rule is that if one has leftover oil from lighting Hanukkah candles, that oil is huktzah lemitzvato. It’s designated for the mitzvah (commandment), and therefore cannot be used for any other mundane purpose, nor can it be used for a different mitzvah other than lighting Hanukkah candles. For Shabbat candles, or lighting in the Beit Knesset (synagogue), or lighting to be able to study Torah, it is not permitted to use something that was designated for one mitzvah for a different mitzvah. Therefore, all leftover oil must simply be burned off, and no individual benefit may be derived from it.
This, however, applies only if there was oil left in the cups that did not burn during the first half hour the candles were lit. When one lights the candles, they only have to last for a half hour. So if, let’s say, they go out after 15 minutes for whatever reason, then the remaining oil is huktzah lemitzvato. It’s designated for the mitzvah because it was supposed to burn for a half hour. However, if the candles burn for a half hour or more and then go out, and you still have a little bit left in the cups, that is not asur (forbidden) to benefit from, because that was already extra oil. It wasn’t designated for the mitzvah.
It therefore goes without saying, and it’s obvious, that if a person purchased extra cups of pre-made oil, or a whole bottle of oil, and never used it for lighting the Hanukkah candles, they could use that oil for whatever they would like. The fact that they purchased it, let’s say, having in mind that they would use it for Hanukkah candles, does not constitute an actual designation allocation for the mitzvah. That’s called hazmana. The person intended it for that purpose, but they knew all along that if they had leftovers, they would end up wanting to use them for something else. They purchased a whole big bottle, knowing that a portion of it would go to the Hanukkah candles, but not the whole thing. So therefore, any leftover jars of oil, or any oil left in the big bottle that a person purchased, could be used for any purpose that a person wishes, whether for a mitzvah or not, and using it does not violate the rule against using something that was designated for the mitzvah of Hanukkah candles.
Have a great day, and Hanukkah Sameach.

