If so, what would be a possible reason to risk losing an heir--even if you had another son. And at what age would it have been expected for the son to participate? If not, what would a prince do instead? Manage the supply line? Guard a castle?
For specification, we can aim for High Middle Age in England.
I can specify for Early Medieval rather than necessarily High Medieval, although there is some considerable overlap. In essence, the answer boils down to the fundamental values of medieval kingship. A medieval king has three major responsibilities: to defend his people, to justly uphold the law, and to maintain the faith. In particular when dealing with early medieval kingship, such as in Anglo-Saxon England, it was vitally important for a king to be seen as a brave and competent military leader. This is why, for example, Harold Godwinson fights on foot in the middle of the battle line at Hastings in 1066.
It may seem dangerous to have your heirs alongside you in a battle, but symbolically, it could almost be more dangerous for them to be seen to be avoiding battle, and thus be weak. The Anglo-Saxon Chronicle portrays a long tradition of heirs taking part in conflict, either alongside their fathers and brothers, or often leading armies independently. According to Asser's Vita Ælfredi, King Alfred, for example, was initially unlikely to be a king, and trained for priesthood, but as his oldest brothers were killed, he begins accompanying his older brothers into battle and learning to be a military leader.
Alfred's own son, Edward, campaigned extensively alongside his father in the 880s and 890s, and according to William of Malmesbury, his grandson and future King of England, Æthelstan, was raised in the Mercian court of his aunt Æthelflæd, and accompanied her military campaigns against both the Welsh and the Vikings. During Æthelstan's reign, his brothers and heirs Edmund and Eadred both take part in the Battle of Brunanburh alongside the king, and the Anglo-Saxon Chronicle describes them leading the charge into the Viking lines.
Where this tradition is not in effect, it can cause issues. The reign of Æthelred II "the Unready" is beset by issues, many of which stem from the fact that he takes the throne as a child and only comes of age to rule independently in the 980s, a decade after his accession. Lavelle (2002) and Roach (2016) both suggest that many of the political problems in Æthelred's reign begin after the deaths of his late father's ministers, who had been largely administering the kingdom. These men were widely respected as experienced leaders, and had fought and campaigned together, and the young Æthelred lacked the experience, symbolism or practiced charisma of leading men into battle.