Must Buddhists stay away from activism lest we develop attachment to the world?
Clearly not. If your practice is to do a long solitary retreat, then by all means do it, but if you are just a lay Buddhist, then invevitably you will encounter other people and it makes sense to try and benefit them somehow.
"Activism" is a very political word. There are activists who accomplish great things and then there are activists who are just angry, noisy, and immature and who create more problems than they solve. So I don't think that "activism" is necessarily needed, but I think it would be great if more Buddhists got involved in some simple types of community service or simply found small ways to be kinder and more helpful to the people around them.
I am always in awe of people who are good parents because I don't have any kids and I can't imagine such a huge responsibility, but the example of good parents is an inspiring one for me, and Mahayana Buddism teaches that we should try to care about other beings as if there are our own children. Once you have that view, it's not a matter of "Should I do something to help people?" it's more a matter of "What should I do next to help people?"
I am not saying we must be cold and uncaring, but must we practice holy indifference with respect to the world? I will give an example. There are the poor and sick. Many NGOs and charities are already doing what they can, plus there are rich philanthropists who also do their bit. In this context, our so-called activism is practically redundant, useless. Others, who are more powerful and richer, are doing a better job already and our contributions won't be missed.
Buddhists don't always have to work on such a large scale. Just cheering someone up or introducing a receptive person to the Dharma can be great things by themselves.
So my point is: must people like us, who are living normal lives and not from privileged backgrounds, ignore the world completely and focus only on our salvation (not because one is uncaring and selfish but because there are other privileged folks who are in a position to care).
The more you observe your "self," the more you'll see that it's interconnected with everything else and both affects and is affected by other beings.
And even if you are doing a long solitary retreat, if you are a Mahayana Buddhist, you will keep the desire to benefit all beings foremost in your mind during that time.