Is activity needed for weight loss? Absolutely not!
However, is it a useful tool to have in your toolbox? For sure! While most people do tend to eat more once they have exercised, as they are naturally more hungry, most people don't fully compensate calorie for calorie. Therefore, it can be used to help create an energy deficit, that will if created consistently will lead to weight loss.
Furthermore, Luo and colleagues found that those people who exercise more regularly tend to have a lower response to food cues. While this finding is likely highly individual, I still think it's a pretty cool finding.
I will stress however, exercise on its own has consistently been shown to be an inefficient tool in creating sustainable weight loss. However, it is identified as a key habit held among weight maintainers after substantial weight loss, and obviously, combined with a good nutrition program it will help you on your weight loss journey.