I checked all 4^4 possibilities, but I can’t find any functions where this is true other than the constant functions.
So either my calculations are flawed, or something trickier is happening to b that can't be achieved with multiplication.
Checking all (8!)^4 choices of four independent permutations of ℤ/8 isn’t practical ... and though I *think* the a=1 case must correspond to multiplication by 3, 5 or 7, even 3 * (8!)^3 is too big.