If a person has an appointment she must attend after the candle lighting time but needs to depart before the candle lighting time, what should the person do?
There are different opinions as to the right time to light. The earliest would allow one to light at 3.35 PM in New York on the first day of Hanuka 2017 (but it changes with location, see here under Plag Hamincha). If this is too late for you, then you can appoint a messenger (shaliah) to light for you or light yourself when you return (see e.g., here).
There are two opinions as to when is the ideal time during the week (i.e. except for Friday and Motza'ei Shabbat, when Shabbat affects the timing). Minhag Yerushalayim (which many, but not everyone in Jerusalem follow - and some outside Jerusalem do follow) is to light right after the setting of the sun. Those who light with sunset should have already davened Mincha, and should subsequently daven Maariv at the appropriate time, obviously after lighting candles.
The "rest of the Jewish world" lights when the "light of the sun has left the sky", i.e. Stars-Out a.k.a. Tzeit HaKochavim. There are different opinions as to when Stars-Out occurs. Except for Friday and Motza'ei Shabbat, the earlier times are available to use for candle lighting. The times of Stars-out can be as little as 13 minutes after sunset, 17 minutes, 20 minutes, 25 minutes. Those who light with Stars-Out should light right after Maariv, unless they have a fixed time later in the evening for davening, in which case they can light before davening.
Stars-Out lighters should favor the earlier times for TZEIT (except, of course for Motza"Sh. 17-20 mins after sunset seems to be a good time to shoot for).
If on a weeknight one will be unable to light after Shekiyah or Tzet Hakochavim and will miss the mitzvah totally, he should light after Plag HaMincha. Many poskim say that one may light with a bracha in this case, while others say that one should light without a bracha.
Note that in such a case you need candles that last until 30 minutes after nightfall.
Best is to make sure to be at home. Barring that:
You can either light earlier - from Plag HaMincha, or else appoint somebody to light for you at the correct time, or else light when you get home if you have somebody to light for (a significant other, family or a busy street).