How can I make sure I'll get credit for my work when working with unwanted and untrusted collaborator?
Communication is needed and you need to communicate to your co-advisor your feelings rather than second-guessing things and increase your frustration. You may lack some aspects of the picture that your advisor's see. So I would suggest the following:


Prepare everything to as close as the final product (manuscript) you can at this point. Add your name as sole author (unless anyone else deserves co-authorship at this stage)
Present the work to your co-advisor for discussion and point out what "little" is left to do and discuss what remains to be done. This can then lead to understanding of what other could contribute that is not accomplished in your work.
Once you have the situation a little more clear and depending on the outcome, state how you would like to see the distribution of co-authorship and take any discussion that follows.


Hopefully this will put you in a clearer position when considering taking on additional collaborators.

Please also check the tag authors or search for contributorship here on academia to et input on what should be involved in adding names on a manuscript (here is a link to one example).