Traditionally, all of the Tanak can be referred to as Torah.
The word "Torah" is a tricky one, because it can mean different things in different contexts. In its most limited sense, "Torah" refers to the Five Books of Moses: Genesis, Exodus, Leviticus, Numbers, and Deuteronomy. But the word "torah" can also be used to refer to the entire Hebrew Bible (the body of scripture known to non-Jews as the Old Testament and to Jews as the Tanakh or Written Torah), or in its broadest sense, to the whole body of Jewish law and teachings. (Mechon-Mamre)
The word torah can also mean an individual law or teaching, though mitzvah would be more common for a commandment.
Additionally, the whole Tanak is called the "Written Torah" while writings from the Rabbinic era are called the "Oral Torah."
This division between oral and written torah was used in the time of the Mishnah, compiled ca. AD 200 by Rabbi Judah HaNasi. In Mishnah Avot Chapter 1 (emphasis added),
MISHNA A. Moses received the Law on Sinai and delivered it to Joshua; Joshua in turn handed it down to the Elders (not to the seventy Elders of Moses' time but to the later Elders who have ruled Israel, and each of them delivered it to his successor); from the Elders it descended to the prophets (beginning with Eli and Samuel), and each of them delivered it to his successors until it reached the men of the Great Assembly. The last, named originated three maxims: "Be not hasty in judgment; Bring up many disciples; and, Erect safe guards for the Law."
MISHNA B. Simeon the just was one of the remnants of the Great Assembly. His motto was: "The order of the world rests upon three things: on law, on worship, and on bestowal of favors."
MISHNA C. Antigonus of Socho, who received it from Simeon the just, was in the habit of saying: "Be not like slaves who serve their master for the sake of the compensation; be like such servants as labor for their master without reward; and let the fear of Heaven be upon you."
Clearly, they aren't talking about just the Pentateuch. Something more is being passed on as Torah and the current leaders are adding maxims to it. Mishna Avot continues in this manner of recording the maxims of the elders.
Similarly, the Aboth of R. Nathan quotes:
The same is the case with evil thoughts: there is no other preventive but the Torah, which is likened to fire. As it is written [Prov. xxv. 21, 22]: "If thy enemy be hungry, give him bread to eat; and if he be thirsty, give him water to drink; for though thou gatherest coals of fire upon his head, yet will the Lord repay it unto thee." Do not read יְשלֵם לךְ (repay unto thee), but יַשְלִים לךְ(make thee at peace).
Here, he refers to Torah as a burning fire and quotes from Proverbs to make his case. Thus he sees Proverbs (from the Writings) as Torah. While Aboth of R. Nathan is estimated to be from AD 700-900, it shows the tradition of all written Torah is "Torah" to be old.
He does so also with the Prophets. Explaining the quote above from R. Simeon the Just, R. Nathan says,
"Upon the Torah." How so? It is written [Hosea, vi. 6]: For piety I desired, and not sacrifice; and the knowledge of God more than burnt-offerings." Infer from this that the burnt-offering is more favored than ordinary sacrifices, because it is all burnt up in the fire, as it is written [Lev. i. 9]: "And the priest shall burn the whole on the altar," and elsewhere [I Sam. vii. 9]: "And Samuel took the sucking lamb and offered it for an entire burnt-offering unto the Lord." Yet the study of the Law is more acceptable in the sight of the Lord than burnt-offerings, because he who is studying the Torah knows the will of the Lord, as it is written [Prov. ii. 5]: "Then wilt thou understand the fear of the Lord, and the knowledge of God wilt thou find." From this it may be inferred that when a sage lectures to the public it is accounted to him in Scripture as if sacrificing fat and blood upon the altar.
In his explanation of what Torah is and how it upholds the world, Nathan quotes from Hosea, Leviticus, 1 Samuel, and Proverbs.
In Mishnah Avot Chapter 2 itself, a conversation between 6 rabbis who lived in the first century quotes from Psalms (part of the Writings) as Torah.
MISHNA K. He (Johanan b. Zakkai) said to [them] once: "Go out and find what is the best thing to cultivate." R. Eliezer said: A generous eye; R. Joshua said: A loyal friend; R. Jose said: A good neighbor; R. Simeon thought: Prudence and foresight; R. Elazar said: A good heart. Thereupon the Master said: "I consider R. Elazar b. Arach's judgment the best, for in his all of yours are included."
He said to them again: "Go and find out which is the evil way a man should shun." R. Eliezer said: An evil eye; R. Joshua said: An evil companion; R. Jose said: An evil neighbor; and R. Simeon said; He that borrowed and repayeth not; he that borrows from a man is the same as if he borroweth from the Omnipotent, as it is written [Ps. xxxvii. 2 1]: "The wicked borroweth and repayeth not, but the righteous is beneficent and giveth.", R. Elazar said: An evil heart. Thereupon the Master said: "I consider R. Elazar b. Arach's judgment the best, for in his all of yours are included."