The simplest way to do this would be with the help of temporary variables.
length = 4
play = 0
def advance():
tmp = play
play = play + 1
return (tmp % length)
def decrease():
tmp = play
play = play - 1
return (tmp % length)
Running this code with your example test cases should result in the same values being returned. My Python is a bit rusty so the syntax may not be 100% accurate, but the concept is there.