Grad student protecing ideas in a research paper for futher development
On the face of it this sounds very serious. Of course there may be information that can explain some of the aspects that are unknown to me and also you. So with that in mind.

If you have come up with the idea on your own, the work you have done is certainly yours. Often the basic idea is given by, for example, the adviser, in which case some (how much can differ widely) of the intellectual input is shared. You will, through your work still have some degree of ownership. If the adviser has given a similar basic idea to several students the situation can become really messy. It is not clear from your post if the other students started their work, once they got wind of your success or if they were given earlier input to start along the same lines. In any case, I would argue that the adviser has a responsibility to also protect your possible ownership but unfortunately what is ethically correct and what happens in real life can deviate significantly.

So what can be done? The first thing to do is to talk to the advisor and say you want to work this up to a publication (I have to assume here that you know or have had indications it can be published). In other fields it is possible to post work online to get a time stamp on your work, what possibilities exist for you I will leave to others who may know such possibilities to comment upon. 

The comment that "it is for others to use" seems ridiculous. Unless there is a policy or local rule that states that anything produced within a course belongs to the school or course responsible or does not belong to the student, it appears quite unethical to take such a stance. Laws on immaterial rights or intellectual property are usually quite strong. It may therefore be useful to take the matter up with someone in the department who is either there to handle the graduate studies or some form of counsellor at the university level. You must know what structures are in place for possible grievances. the important point is that you need to figure out where you stand based on the details that are known. This is also why a very black or white answer cannot be given here, the information is too weak. But, based on what you have made known the situation sounds problematic from an ethical point of view.