The 44-year-old actor joked he hoped God had a "sense of humour" about his appearances opposite the foul-mouthed bear in the raunchy comedies, reported People Magazine.
After a young soloist performed at the event, Wahlberg took to the podium and said, "That was truly the voice of an angel. But then he whispered in my ear that he loved the movie 'Ted'. And I told him that was not appropriate for a boy of his age.
"Holy Father please forgive me," Wahlberg, who is Catholic, said to the Pope.
The World Meeting of Families, which is the world's largest Catholic gathering of families, also included performances by Aretha Franklin and Andrea Boccelli.