Okay, so they're allowed to refuse to send troops, but let's explore further. What if the Prime Minister did decide to violate this?
Let's go back to first principles here.
Technically the prime minister serves at the pleasure of the governor general and the governor general is appointed by the king/queen, so again, technically, in your scenario the king and the governor general could decide that Canada was violating its constitutional relationship to Britain when it refused to join the war and therefore fire the prime minister.
However, they would then be required to either appoint a new prime minister they believed had the support of Parliament, or call an election. If the next prime minister similarly refused orders, we'd be back where we started.
I suppose that the alternative would be to refer the matter to court. In that event, I really have no idea how the courts would rule. At least according to the political process, Canada did not have independence over its foreign policy until 1931, but the constitution is vague enough that the court system might not agree with that.
The reality is that whether the British preferred to address this via the courts or via the governor general, the last thing they would want to do in the middle of Europe falling apart was devote precious Cabinet time to considering a wayward colony. I think they would have had little choice but to accept that Canada would not be part of the war effort.
Again, though, especially outside of Quebec public opinion was clearly in favour of joining the war in 1914, so there really would have been no political incentive for the government to take this step even if they wanted to, which so far as I know, they didn't.
The situation was somewhat different in 1939 because in 1931 Britain agreed that the dominions could have independent foreign policies. In 1939, Mackenzie King still would have been well within his prerogative as the prime minister to declare that because Britain was at war, Canada was at war.
Edit: I should also mention that if the problem is simply a prime minister who "goes rogue" by refusing to join the war, on his own and without his party backing him, they can simply remove him from power and choose a successor to become prime minister. Ironically, Canada doesn't hold its presidents in anything like the awe that Americans seem to their presidents. Ours are eminently more disposable, and a prime minister who announced in 1914 that Canada was severing its ties to the British Empire probably would not last out the week.