The Ak generalization of the O(1) loop model on a cylinder: affine Hecke algebra, q-KZ equation and the sum rule