Registered sex offender David Hope, of Granby Close, Headingley had also stayed at a place where another boy, aged under 16, was residing during a visit to Shropshire, Telford Magistrates Court heard.
The 69-year-old, who previously taught music, was made subject of a sexual harm prevention order lasting five years in 2013 after being caught in possession of indecent images of children.
It prohibited him from having unsupervised contact with a boy under the age of 16, among other things.
Leeds Crown Court previously heard he had more than 2,000 images of boys, many wearing just swimming trucks or their underwear, which he had downloaded on the internet or which were photographs.
Telford Magistrates Court heard on Tuesday that Hope had stayed in Ludlow in August last year.
Ms Abigail Hall, prosecuting, said during his time in the county he had been sat in an outside courtyard where another boy had been present.
She told the court that the boy’s mother had been unaware of his conviction and he had failed to tell police he was staying somewhere where other children were staying.
Ms Hall said on another occasion he had given a lift to another boy in his sports car.
She said: “He was alone with him for approximately 15 minutes or so.”
Hope pleaded guilty to failing to comply with the requirements of the sex offenders register and breaching his sexual harm prevention order.
Representing himself at court, Hope told magistrates: “I have had this order now for four years.
“I’ve followed it. I’ve done all the relevant probation work. I did five courses altogether.”
Hope said when he arrived in Ludlow and realised a child would be staying at the same place as him he had tried to call his public protection officer in Leeds, but had no phone signal.
He said he had only been sitting in the courtyard to read a newspaper and drink coffee, and regarded it as a public place.
He admitted that on occasion a boy had also been present in the courtyard.
Hope said: “If he talked to me I spoke back and that was it.”
He said the second boy had been keen to ride in his car, but added: “I shouldn’t have done it.
“Having been a teacher I didn’t like to let children down when they were excited about something.”
He said he had taught music for most of his life.
Magistrates adjourned the case for a probation officer to prepare a report.
Hope is expected to be sentenced at Telford Magistrates Court next month.
He was given conditional bail until the hearing.