This is my attempt at understanding this:
言っとかんと = 言っておかない と(いけない）
なあ = 「な」emotive sentence ending particle
"I need to say (thanks) , don't I..."
I'm not sure what ておく would mean if this guess is correct. I know it can mean "to do in advance", but he can't thank the neighbors in "advance" because the ice cream is already given to his daughter (from the first panel). I know it can also mean "to do leave something in a certain state", but I can't make sense of that in this sentence either.