Hi Flemming,
There are two St Mary's Cathedrals in Edinburgh - One a Roman Catholic cathedral, the other is Scottish Episcopalian.
Plus there is Broughton St Mary's Parish Church (Church of Scot) and in Leith, St Mary's Star of the Sea (Roman Catholic).
All of these were functioning in 1870s with the possible exception of the Episcopal Cathedral which it appears was built during that decade.
Could your ancestor be referring to events at one of these churches?
Looby
Added - If you look in Scotlands People website and opt for "Church Registers" then select Roman Catholic church then Birth/Baptism or Marriages etc, there is also the option Parish/Congregation and you can choose St Mary's Cathedral or St Mary's Leith from the list.