According to the rules on World Squash site
A return is good if the ball:
6.2.1 is struck correctly before it has bounced twice on the floor; and
6.2.2 without hitting either player, or their clothing or racket, hits the front wall,
either directly or after hitting any other wall(s), above the tin and below
the out-line, without having first bounced on the floor; and
6.2.3 rebounds from the front wall without touching the tin; and
6.2.4 is not out.
So, regardless if it hits the side or back wall, the ball can only bounce at most once to keep the rally going.
The rules only mention the requirement of hitting the front wall above the tin. the ball can strike any other wall at anytime provided the ball only has at most bounced once.