Can LLM Graph Reasoning Generalize beyond Pattern Memorization?