It is peculiar why the Gemara considers a candle lit on Shabbat by a Non-Jew as something with which forbidden work has been done, since a Non-Jew is allowed to light fire on Shabbat or use it to do other types of work with. Aruch Hashulchan (Orach Chaim 298:9) proposes that what the Talmud means is that really since if a Jew would have lit the candle on Shabbat it would have been forbidden to be used for Havdalah because a transgression was done with it, we also forbid it if a Non-Jew lit it even though he himself was permitted to do so. In other words, it is the candle itself that needed to rest on Shabbat, sort of speak, from a forbidden type of work. In the case of a sick person, however, it is a mitzvah to light the candle for him, therefore it is not considered to be a forbidden type of work, where as when a Non-Jew lit it is simply permitted, but it is not a mitzvah, therefore it is considered to be as if forbidden works was done with it. I have to admit that this answer is somewhat farfetched however I do not have a better explanation. Due to this very issue, Rabbi Adin Steinsaltz in his edition of Talmud Bavli (Berachot p.232, Iyunim, Ohr Sheshabat) proposes a completely different explanation of what the Talmud means when it says that “the light needed to rest” from those of the Rishonim (medieval authorities) that I have mentioned above. He says that the reason the Rabbis have required to say a Beracha on seeing a light at the conclusion of Shabbat is not because of a commemoration of God’s creation of light, but rather because we want to show that Shabbat is over and now it is permitted to do work. Therefore we take an action that was forbidden on Shabbat, merely lighting a fire, and do it as a part of the Havdalah ceremony to show that Shabbat is over. Since a Non-Jew was never forbidden to light a fire on Shabbat in the first place, a fire lit by him would not fit for this purpose since it was not a fire that was forbidden on Shabbat. In other words, it has to be a type of a fire that itself was forbidden to be lit on Shabbat and since a fire of a Non-Jew was permitted to be lit on Shabbat all along it is not fitting for Havdalah. However in the case of a sick person we consider it as a fire that was still forbidden to be lit, however the Torah gave a special dispensation in this case to light it. I find this explanation interesting however I do not see how it fits into the words of the Talmud.