Doing masters thesis in another institute Is it possible to do this? If I find a research group/researcher working on something I like and I just want to do my thesis there. Is it necessary that 


I have to go there as an exchange student OR
I will have to enroll in their masters program?


I suppose the only way to do what I am asking about it via an exchange program,but is there any other way?
This depends strongly upon what university you're attending now, and where you want to do your research. For instance, in Germany, students are allowed to do a master's thesis anywhere in the world, but they are responsible for organizing this themselves. Other schools and departments in other countries may have more restrictive policies. 

An exchange program may or may not be necessary, but this is entirely dependent on the specific policies of both the school you're attending and the school or institute you'd like to do your thesis work at. The best guidance I can give you is to first ask the graduate students' office or "graduate officer" of your current department to ask what the relevant regulations are for your home institute. Then talk to the other institute. Of course, start such a process well in advance of when you want to do the thesis work; a semester at the minimum, a year is more strongly recommended, as it may take several months to organize the required paperwork and visas (if you're planning on traveling abroad to do the thesis).