Because forgiveness is a virtue, which is concerned about goodness, then it has similar qualities as justice or patience or kindness. Can someone who does not believe in God be patient? What about being fair? Can someone who does not believe in God practice the human qualities of justice and patience and kindness?
The answer seems to be an obvious yes. Therefore, it follows that those who do not believe in God can practice the virtue of forgiveness as well. Different belief systems will be more or less supportive of your forgiving and will have different practices and rituals for forgiving, and will challenge you to go more deeply into forgiving, but the action of forgiving itself is a human action and not one isolated to certain persons with certain beliefs.