Jason Alan Coote, 51, was told by a magistrate in Preston he could have been jailed immediately for getting behind the wheel of his car less than two months after being banned for drink driving.
"I want you to realise just how serious a matter it is," said chair of the justices' panel Joyce Frost. "It absolutely can send you direct to custody.
"It is a decision you made thinking it was OK. We don't look at this lightly at all."
Coote, who broke his back while serving in the second Gulf War in Iraq, told the court he had taken a six-mile round trip to pick his son up when he was taken ill at school.
Standing in the dock proudly wearing a string of medals and supported by a walking stick, the veteran was disqualified for 18 months.
The magistrate told him it was "highly likely" he would get a custodial sentence if he repeated the offence.
Coote, of Blackburn Road, Wheelton near Chorley, had pleaded guilty at an earlier hearing and was appearing before the magistrates for sentence.
The court heard that police received a tip-off that a man who was believed to be disqualified was driving a car near Wheelton. An officer arrived outside the address of the vehicle's keeper and soon Coote drove up with his son in the car.
He admitted to the constable that his licence had been suspended and was taken to the police station where it was discovered he had been banned for a year two months earlier for driving with excess alcohol in his system.
Defence lawyer Ian Anderson told the court Coote was suffering from a degenerative spinal condition after breaking his back in the Gulf War. The injury had been exacerbated by a road traffic collision in 2017.
As a result he suffered from mobility problems, was unable to work and was therefore on benefits. He also suffered from depression and anxiety.
He was the sole carer for his son who had a condition which needed regular visits to hospital.
The boy had been taken ill at school that day and, without any friends or relatives who could pick him up, he had decided to drive.
"That's what led him to drive that day," said Mr Anderson. "He is aware that his disqualification will be extended."
The lawyer asked if, because of Coote's mobility problems, his struggles with mental health and the further hardship a lengthy ban would cause him, the magistrates could keep the disqualification as short as possible.
The magistrates' chair said that there were mitigating circumstances such as he had pleaded guilty at the earliest opportunity, he was the sole carer of his son and he had co-operated fully with the police.
They had taken all those into account and instead of sending him directly to custody "which we could very easily have done”, they sentenced Coote to a 12-month community order which would require him to attend up to 15 rehabilitation activity days.
He was also fined £180, with £85 court costs and a £95 victim surcharge.