Hannay, who is campaigning on a platform of shaking up the councillors' controversial code of conduct, reducing management and promoting grassroots democracy, had unsuccessfully run for Napier City Council for the last 24 years.
The youth worker turned retailer had a major heart attack during the 2016 elections, and had been waiting for surgery since.
He was disappointed to miss the mayoral debate in Napier on Wednesday, as well as several other candidate events this week.
"My wife gets pretty stressed out because I have been talking about escaping the hospital," he said.
Despite the setback, he was still very much in the race for the mayoralty, he said.
He was hoping his surgery could take place as soon as today with an expected recovery time of two weeks.
The other mayoral candidates are Kirsten Wise, Chris Tremain and Steve Gibson.
- RNZ