Actually, King William III was in favor of allowing Anne-Marie's son to inherit the English and Scottish thrones.
In the 1690's, Anne had only one living child, the Duke of Gloucester, who was not well. William was worried about the succession, and opened secret negotiations with Anne-Marie's husband, the Duke of Savoy. William's goal was for the Duke of Savoy and Anne-Marie to turn over their son to him to raise; the boy would have to become an Anglican and live in England permanently, but he would be in a good position to inherit the thrones. William made this offer largely to keep Savoy on his side in the war against Louis XIV. Savoy was small but it was strategically located.
The Duke of Savoy and Anne-Marie turned the offer down. They didn't want to send their son away, particularly since there was no guarantee that he would succeed to the thrones, since William of Gloucester was still alive. Also, Louis XIV made a counter-offer around the same time, in an effort to detach Savoy from the alliance against him. As a result of Louis's offer, one of their daughters, Marie Adelaide, was sent to marry Louis XIV's grandson, the Duke of Bourgogne; Marie Adelaide's son would eventually rule France as Louis XV.
If I remember correctly, the Duke of Savoy changed sides several times during the conflict in order to add to his territory and his status. As a result of his clever manuevering, his duchy of Savoy eventually became recognized as the kingdom of Sardinia.
I think Queen Anne would have liked to have had her brother James become her heir, though she genuinely liked Anne-Marie. The problem was the fact that James was Catholic, and he did not recognize the Bill of Rights or the Act of Union. Various power players in England negotiated with James on these points, but he was immovable, so the succession passed according to the Act of 1701.
All of this is just my opinion and your mileage may vary.