Welcome to iMovie Discussions.
The materials which comprise iMovie are provided "as is", to my understanding, for anything you want to do with them, apart from sell those materials as your own work ..so they're tools which you can use to make anything you like (..except selling-on iMovie itself as if it were your own property).
iMovie has been used to create commercial movies - the first which springs to mind is "Tarnation" ..this paragraph is from Kurt Loder's comments on it
here..
".. "Tarnation" is a powerful and unsparing movie; it's sometimes painful to watch. The film was created — edited, mixed, and layered with simple but vividly evocative effects — on an iMac, using the pre-installed iMovie software. Its total cost was $218.32. (Another $400,000 — raised with the help of directors Gus Van Sant and John Cameron Mitchell, who've served as executive producers — has been required to clear the movie's many music and film clips, to do a final mix and to strike prints.).."
Michael Ornstein used iMovie for his film "Time" (..this quotation "Michael filmed, wrote, produced and directed "Time", which was one of the first Digital Video feature films ever made. Michael completely re-edited and color-treated the film in 2003, entirely on iMovie" is from his entry on the Internet Movie Database here:
http://www.imdb.com/name/nm0650355/bio ..)
So, yes; you can do this.
Of course, I don't work for Apple, and if you really want a legal opinion from them, go first to
http://www.apple.com/legal/ where you'll find assorted info, and to ask questions of Apple themselves, go to
http://www.apple.com/contact/