I have read the Geeta but I am unable to understand what exactly is someone's Dharma. If I am an established teacher from a kshatriya varna, is my dharma to teach or to protect/fight in a war? For example, Parshurama was born in a brahmin family but he portrayed himself as a kshatriya. Does that mean he was adharmic? If he wasn't adharmic, then what is the reason for having the caste-system as anyone from any caste can do any occupation as they desire?
The answer to your question can be found by scrutinising the Gita verses on Varna.
I am posting the relevant Gita verses on varna:
O great hero! The duties of Brahmanas, Ksatriyas, Vaisyas and also Sudras have been divided according to the quality born of their own nature. [Gita 18.41]
Serenity, control of the sense, austerity, purity, straight-forwardness, knowledge, insight, and faith in the Supreme Being - these are a Brahman's duties born of his own nature. [Gita 18.42]
Prowess, splendor of personality, unfailing courage, resourcefulness, dauntless in battle, generosity, leadership - these are a Ksatriya's duties born of his specific nature. [Gita 18.43]
Agriculture, cattle-rearing and trade form the duty of the Vaisya springing from his own nature, while the natural duty of a Sudra consists in subordinate service under others. [Gita 18.44]
By being devoted to one's own natural duty, man attains to spiritual competency. Now hear how devotion to one's own natural duty generates spiritual competency. [Gita 18.45]
From whom all beings have emanated and by whom all this universe is pervaded - by worshipping Him through the dedicated performance of one's duty, man attains to spiritual competency. [Gita 18.46]
One's own duty, even if without excellence (i.e. inferior in the scale of worldy values)is more meritorious spiritually than the apparently well-performed duty of another. For no sin is incurred by one doing works ordained according to one's nature. [Gita 18.47]
As can be seen Gita varna is dependent on Karma and Gunas and has nothing to do with the last name dependent Jati system of Hindus. Varna is not dependent on occupation. It is the other way round. Occupation should be chosen according to your Varna or mental makeup. Look at the bolded portion of Gita 18.47 where you are asked to choose an occupation that suits your nature. Thus it does not matter what Jati someone is born into. What is important is the mental makeup due to Karma and Gunas of the person. Thus Parshurama must have felt that his mental makeup is closer to that of a Kshatriya than to other Varnas. Drona also chose to be a weapons instructor presumably because it suited his mental makeup. You cannot ask a Sachin Tendulkar to be a rocket scientist while an Abdul Kalam will simply not succeed as a cricketer. One has to choose that work which best suits him.
I think caste or casting is meant to improve the process only. But the word been over killed in india due to political reasons.
I feel every one of us have the freedom to choose what we want to do. In a age where a Tea seller will lead a country like King. A refuge become a founder of top company. It is about the choice we make and whether we are giving our best to it.
Dharma for me is not derived from verna now. It is the conscious choice of what you choose to be and whether you are giving your best to it or not.
Valmiki Ramayana says, "Raamo vigrahavan dharmaha" i.e. Rama is dharma personified.
In Bhagavad Gita,Lord Krishna says :
"Sarva dharman parityajya mam ekam sharanam vraja, ahantva sarva paapebyo moksha iccha mi maa suchaha"
Which is giving up the 32 Vidyas like sad vidya, bhuma vidya etc, surrender to Lord krishna/Vishnu/Narayana alone, and He alone will destroy all the karmas and grant moksha.
In Vishnu sagasranama, part of vyasa Mahabharata, bheeshma says :
"Dharmasya Prabhur achyuthaha" i.e. Achyutha is the actual dharma.
In Vishnu Sahasranama bhasya of Adi Shankar's, for VrishaKapi and many other names, the Lord of Dharma is Lord Varaha.
Vyasa Mahabharata says Dharma protected Draupadi during vastrapaharanam. This Dharma is identified as Lord Krishna only by all acharyas.
So, worshiping and saranagati to Krishna/Vishnu/Narayana alone is the ultimate dharma.