The boy, who was 14 at the time and cannot be named, was seen kneeling behind a black labrador.
He ran off but was caught the next day.
Blood was found on his underwear, a youth court in Reading heard.
Agniszka Fryele-Sapinska, who witnessed the alleged incident on Hungerford Common, Berks, said: “I felt sick to my stomach.”
The boy denies the s*x act.
The hearing continues.