To start, a belief in the infallibility of Chazal is not one of the Rambam's thirteen principles of faith, nor is it part of any other system of fundamental beliefs (as far as I know). So you are safe from charges of heresy.
However, you may not be safe in the next world. The question here is where does free thinking cross the line of "mevazeh divrei chachamim", belittling the wisdom of the sages? And the converse is (and this is your question) - does respecting the wisdom of the sages mean we are not allowed to think?
It should be pretty obvious that we are allowed to think (sorry, I guess that's not obvious...) and that as soon as we start thinking about the world we are bound to entertain ideas which conflict with a straight reading of the word of Chazal. Free thinking requires an ability to think hold in mind two conflicting ideas or statements until you can resolve them.
To take your example, you see a conflict between dark matter in the universe and Chazal's statement that everything was created for man's sake. If you reject Chazal based on your understanding of dark matter I would say that that is belittling the wisdom of Chazal. It also means you are not gaining any insight from Chazal, and that might be worse. So let's move along by putting the words of Chazal "on the side" - we do not know how to interpret them, but without rejecting them. Now you can say "I know of dark matter, I believe it has nothing to do with man, and I leave open the question of what Chazal meant by saying that all was created for man's sake." Now you have free-thought, but without rejecting or belittling the words of Chazal.
Before continuing, I will point out that I think your example was needlessly dismissive of Chazal, and also that it should not really be called free-thinking. Both problems, and the fact that you find a challenge here in free-thinking, come from an unduly bland reading of both Chazal, and of the reality of dark matter. I know nothing about dark matter, and, unless you are a astrophysicist, you also know almost nothing about dark matter, because almost nothing is known about it. Therefore, there is no way, based on the reality of dark matter, to say if it does or does not affect humanity, and no way to form an opinion if it was necessary or not for mankind. On the other hand, there is nothing in the statement "all was made for man's sake" which tells us that everything in the universe is to be directly utilized by man, and obviously there is much which does not directly serve us, and Chazal were well aware of that.
Now we can go back and ask what Chazal meant when they said "all was created for man's sake", and it is clear that it cannot mean that we are meant to utilize everything in the world. It is easiest to interpret it along the lines that everything in the world, one way or another, had to be there, so that humanity could arise and flourish as it did. This includes a massive galaxy that can serve as a host to our star which can then host our planet. This includes earthly phenomena which do not directly serve us, but are necessary results of the laws of physics which give us the world we know.
Chazal are not teaching science with this statement. They are giving us a perspective on the world, and teaching us how to look at the entire creation from a human-centric perspective. Understood like this, there is no conflict at all between this statement and science. We can now bring back the statement of Chazal which we "put on the side" before, with a better understanding, and now turn back to dark matter. We do know enough about dark matter to say that the universe as we know it would unravel without it, and then there would be no galaxy and no solar system and no earth and no humanity, and therefore God created dark matter for the emergence of the world and for the sake of man.
So to answer your question, the limit of free thinking is the limit of your ability to consider your idea without rejecting conflicting statements. As long as we can respect the words of Chazal even without understanding them, we may try to understand the world as well as we can, and to try to understand the words of Chazal and how they fit with the world we see, and also to learn from their statement -- even before we fully understand them -- to guide us in our own effort to understand the world.
Can we assume just like Chazal were seemingly wrong about the earth being flatWhy do you assume that Hazal believed the Earth was flat? Although one may find statements indicated that individuals believed the world was flat, do you have any evidence that Hazal as a collective body believed this? – mevaqesh Sep 27 '16 at 14:39As another example, Chazal tell us design proves the existence of a designer (midrash of Rabbi Akiva and the garment in Temurah 3) and that this is the reality.I don't see anything about Hazal telling us anything in the link. All I see is a single figure. Interestingly, Midrash Temurah is thought to be a 13th century work based on Ibn Ezra (among others). Thus, not a good measure of what any members of Hazal thought. – mevaqesh Sep 27 '16 at 18:30Is one allowed to trust...Is one allowed to deny..., and the issue of what is or is not correctshould one assume chazal were right– mevaqesh Sep 27 '16 at 18:34