I believe it is indeed "We'll court on the lock". Or possibly "lough" if there is one there. The zoo is in Phoenix Park. Castleknock is the adjacent neighborhood. The Royal Canal runs from the Liffey through Ashtown to Castleknock before heading out to Mullingar. So the geography is right, though I don't know if the canal has a lock right there.
"Court" is an old word for what was called "making out". It could include more than kissing and petting, but did not have to. The unforunate young man caught "Coortin' in the kitchen" probably kept his pants on for all the good it did him.
I think the lady in "Zoological Gardens" was pretty enthusiastic about making out, and in the song, her being of the "rare old stock" seems to have resulted in a wedding ring and eventual children.