Yeah, you can swim if you want to just be careful because the flow of water is high. You’ve travelled closer to the origin of Ganga where water is extremely clear.
Pollution in the mountains is far less than the city (almost negligible) so there are no reasons to avoid taking a dip in holy waters of Ganga that are believed to purge your soul.