A retired police dog has had specialist surgery to reconstruct his spine after a charity said years of working had taken its toll on his body.