I believe that most of what we know about the "history" of blessed oil today is originally from the Catholic church. So there is plenty of information from that side.
Using oil in the church has been the subject of many controversies, and it does not seem that they were ever settled one way or the other.
The danger, so to speak, is that the way it was done through the rites/sacraments in the Catholic church - until today - led to believe that the oil itself actually had the power of healing, in the case of anointing the sick. That I know of, the terms "blessed oil" is primarily used in the Catholic church, just like they also have the blessed water...
Other than that - and I certainly don't know everything - the Old Testament has plenty of references to oil, especially in the book of Exodus, and it was olive oil used for anointing, and also for sacrifices and other instances according to the Law.
However, the "sacred oil" was the one used to anoint the high priests and kings only. It was forbidden to put any of it on anybody else, for any purpose. It had to use the purest olive oil, among other ingredients.
The daily life of the Jews in those days called for the use of oil in their different day rituals, or when fasting, etc.. and also traditionally olive oil was believed to have some medicinal properties so, the Jews always carried some of it with them.
As far as the oil being related to healing, the way to use it for healing best described in the Law is in the case of leprosy:
Lev 14:2 This shall be the law of the leper in the day of his cleansing: He shall be brought unto the priest:
Lev 14:15 And the priest shall take [some] of the log of oil, and pour [it] into the palm of his own left hand:
Lev 14:16 And the priest shall dip his right finger in the oil that [is] in his left hand, and shall sprinkle of the oil with his finger seven times before the LORD:
Lev 14:17 And of the rest of the oil that [is] in his hand shall the priest put upon the tip of the right ear of him that is to be cleansed, and upon the thumb of his right hand, and upon the great toe of his right foot, upon the blood of the trespass offering:
Lev 14:18 And the remnant of the oil that [is] in the priest's hand he shall pour upon the head of him that is to be cleansed: and the priest shall make an atonement for him before the LORD.
Basically, all the sacrifices involved the use of oil...
In the New Testament, there are two scriptures mentioning anointing with oil specifically for healing:
Mar 6:12 And they went out, and preached that men should repent.
Mar 6:13 And they cast out many devils, and anointed with oil many that were sick, and healed [them].
Jam 5:14 Is any sick among you? let him call for the elders of the church; and let them pray over him, anointing him with oil in the name of the Lord:
In the days of the Second Temple, there was no longer sacred oil left from the days of Moses. So, whatever oil was used by the apostles, it was not that one... And, there is no explanation about the oil and why it was still used for anointing by the apostles.
These articles have some interesting points regarding the tradition of using oil for the healing of the sick in the church:
The first one is mostly about the Mennonites but it has a very good segment about how anointing with oil "evolved" through the centuries in the church, not just among the Mennonites, how controversial it was and the divisions and persecutions that it even caused in some instances.
The second one is interesting also - imho - because it gives the ethymology of the words in scriptures referring to anointing and oil, even though there is no real answer to the question of using the oil or not.
The Origins and Development of Anointing Among Nineteenth-Century MennonitesMARK R. WENGER
www.goshen.edu/mqr/pastissues/jan05wenger.htmlwww.layhands.com/ShouldWeAnointWithOil.htm