Yes, you can. Both are valid.
a) Togo war deutsch bis 1918.
Togo was German (owned, a colony…) until 1918.
b) Togo wurde deutsch bis 1918.
Togo was German until 1918.
What is the difference?
Minimal or subtle. Depending on goal and context. They can be used as perfectly synonymous. Or with very slight differences:
Synonyms substituable for case a): remained, used to be, stayed, lasted, had been
Synonyms substituable for case a): became, remained, had been, grew, had become, stayed
Getting sticklish about this:
case a) says "Togo /to be/ German until 1918."
case b) says "Togo /to become/ German until 1918."
Historically Togo was a German colony. It became a colony before 1918, and it was one until 1918. Or did it only become a more perfect German colony until 1918?
Saying "Togo wurde deutsch bis 1918" is emphasising the end date and the process that lasted until that date. Colonisation isn't a one-time, one-date affair.
This says something like "Togo wurde deutsch, und blieb es, bis 1918" or "Togo wurde deutsch, und immer deutscher, bis 1918". Wurde thus captures a certain dynamic described, while war just states a legalistic fact: Until 1918, that was its legal status, it was so and so.
Ahistorical, but: "Togo wurde deutsch bis 1918" is a perfectly valid sentence that could express not the legal 'change-of-ownership' 1884 but the slow process (not 'precise' point in time) of the character of the land/the people there becoming more German, German-like. But being so sticklish over contradicting "doesn't make any sense" wird doch sehr deutsch?
It can make sense and probably does make sense if we look at the example cited:
Togo war deutsch nach dem Untergang Deutschlands in 1918.
"Untergang" aside, that means Togo retained a lot of German features, structures perhaps mentality. The inhabitants, the locale elites, the remaining colonists, the civil servants kept some traditions, some language influences etc. Togo remained (a bit/a lot) German (features) after it was no longer an official German colony.
So stylistically and historically better fitting, I'd say
Togo war/blieb sogar noch etwas 'deutsch' nach dem Deutschland 1918 seine Kolonien wie den Weltkrieg verlor…