His 10 Downing Street office here said Cameron picked up Otitis while surfing in the Algarve, where he is currently holidaying with his wife Samantha and their three children.
A Portuguese TV station and several newspapers, quoting local sources, confirmed Cameron had been treated for the ear condition at the mountain village of Monchique - a short drive from where he is staying.
"He was here for around 20 minutes, half an hour. During that time he was seen to by a nurse from our centre and then a doctor," Dr Manuel Veloso, head of the medical centre, told local media.
Otitis is referred to as swimmer's ear because exposure to water can make the ear canal more vulnerable to becoming inflamed.
Cameron, 48, has had some bad luck with water and during an Easter break last year was stung by a jellyfish while swimming in the sea in Lanzarote island in the Atlantic Ocean.