score:8
The word dharma is understood to come from the Sanskrit root dhṛ - in regards to holding or keeping. The word has its history in the vedas, where the meaning is something that holds the world together (i.e. maintains order) - religious hymns, gods, etc. Later texts use the word to refer to the order itself - e.g. "going against dharma", etc. The wikipedia article on Dharma says this and more.
By the time the Buddhism arose, there was already an understanding that different religious teachers described different theories of natural order, so the word dharma had come to have the connotation of "teaching", as in "the dharma of the samana Gotama is different from the dharma of the Niganthas."
There was also the sense that dharma was better than adharma, so dharma came to be associated with the idea of "righteousness".
The Buddha expanded upon these ideas, claiming that what he taught was the true natural order - that his dharma (teaching) was the true dharma (natural order). He went even further to describe reality itself as dharma, as in:
"Bhikkhus, whether there is the arising of the Tathagatas or not, this property stands — this steadfastness of the Dhamma, this orderliness of the Dhamma: All dhammas are non-self.
-- AN 3.134
He also used the word to refer to righteousness, as in:
dhammacārī sukhaṃ seti, asmiṃ loke paramhi ca.
One who fares by the dharma rests in happiness in this world and the next.
-- Dhp 169
For a full treatment of the word, the PED entry for dhamma would be a good source of how the word is used, but to answer your question, yes, it does refer to both those things, since the Buddha taught what he understood to be the natural order of reality.