New York Gov. Andrew Cuomo raised doubts on Thursday about whether he would sign into law a medical marijuana bill advancing through the state Legislature.

The bill, known as the Compassionate Care Act, was transferred out of the Senate Finance Committee over the previous objections of its chairman. That puts it within striking distance of a vote on the Senate floor, with the Legislature due to break for the year next Thursday.

The...