How Formal is 为期 (wei2qi1)－ to last？
Could I say something in the past tense that wasn't expected like "战争为期十年“?

Yes you can. 

为期 is originally a V-O phrase, literally,


为: as, being
期: period, deadline


Putting them together, 为期 means (to be done) by/within (a certain period), which implies the limit is intentionally set. E.g.


  我等你，三年为期。 I'll wait for you for 3 years.


However, the phrase 为期 as a whole can also be used as a verb, and with that usage the sense of 'intentionally set time limit' is dimmed. It merely means to last. E.g.


  为期三年的等待。A waiting that lasted for 3 years.


战争为期十年 is another example for this usage.



How formal is 为期？ Could it ever be used in a regular conversation?

It sounds formal, but it could be used in regular conversation.

In spoken language, the shorter the sentence is, the more people tend to avoid using formal words. So if 战争为期十年 is the whole sentence, it sounds more casual to say 战争持续了十年 or even more colloquially 战争打了十年.

In a long sentence though, it is okay to use formal words if they can shorten the sentence or simplify sentence structure. Because 为期 is shorter than 持续了, 在一场为期十年的战争里，... doesn't sound too much more serious than 在一场持续了十年的战争里, .... This rule applies to other formal/informal phrases too.