Each party decides it's own rule on who can vote for that party's primary. The Republican party decided that only Republican can vote the Republican nominee. The Democrats decided that Democrats AND independents can vote for the Democrat primary.
So if you were a Democrat, you have to use the Democrat ballot. If you are a Republican, you have to use the Republican ballot. (Although I wonder if you can use an independent or non-partisan ballot.) However, if you are a independent, then you can use eith the non-partisan ballot, the independent ballot, or the Democrat ballot.