There are three classes of vowels in Finnish. There can be either A, U, O or Ä, Y, Ö, but never both, inside a single word. E and I are "neutral" vowels. You can find them in both words with A, U, O and Ä, Y, Ö.
With respect to vowel harmony, compound words can be considered separate words. For example, syyskuu ("autumn month" i.e. September) has both u and y, but it consists of two words syys and kuu, and declines syys·kuu·ta (not *syyskuutä). The same goes for enclitics, e.g. taaksepäin "backwards" consists of the word taakse "to back" and -päin "-wards".