Dental health care workers (DHCW) are at a risk of occupational exposure to Helicobacter pylori from the aerosolized oral biofilms and saliva of patients. We designed this study to investigate the prevalence of H. pylori in the oral biofilms of a group of dental and non-dental undergraduates from Sri Lanka. After obtaining informed consent, oral biofilms were collected from 38 dental undergraduates (19 males and 19 females) undergoing clinical training and 33 non-dental undergraduates (14 males and 19 females). The participants were in the age range of 22–27 years and had healthy periodontium. Total DNA from the oral biofilms were extracted, and H. pylori DNA was detected using polymerase chain reaction (PCR) amplification of 16S rRNA gene of H. pylori using JW22-JW23 primers, and the results were confirmed using PCR amplification of H. pylori -urease specific HPU1-HPU2 primers. Out of 71 participants, 11 (28.95%) dental and 3 (9.09%) non-dental undergraduates had H. pylori in their oral biofilms indicating an overall prevalence rate of 19.72% (14/71). Thus, the prevalence of H. pylori in oral biofilms was significantly higher in dental undergraduates than in non-dental undergraduates (p < 0.05). An odds ratio of 4.07 indicated that dental undergraduates were four times more likely to harbor H. pylori in their oral biofilms than nondental undergraduates. Foregoing data support the fact that there may be greater occupational risk of exposure to H. pylori for dental undergraduates during clinical training than that for non-dental undergraduates, warranting meticulous infection control practices during clinical dentistry.