In Massachusetts (as in many other states) there are two stages to the election, a primary election, in which the parties choose their candidates, and a general election, in which the candidates from the parties compete for the post of Governor.
As a registered Republican, you would be able to vote in the Republican Primary and in the General. In the Primary you could choose between Charlie Baker and Scott Lively. In the General you could vote for either the Republican Candidate or the Democratic candidate (either Bob Massie or Jay Gonzales). You could also vote for third party candidate (if one is running), "write-in" a name for a person not running, or leave your ballot blank.
Wikipeda mentions a third party candidate, James Schultz who calls himself a "Libertarian Activist". But I cannot confirm that he is on the ballot. He seems also to be running for the Senate in Nebraska.
Even as a registered Republican, you are not compelled to vote for the Republican candidate in the General election.
A registered Republican cannot vote in the Democratic Primary, whereas an independent may vote in either party's primary. The rules for who may vote in Primaries varies from states to state.
The Massachusetts Primary is on September the 4th, and the General on November 6th (along with the rest of the USA).