Symbolic Working Memory Enhances Language Models for Complex Rule Application