IR can readily identify these materials and the differences are easy to see. Look for the presence of the aldehyde C-H band around 2700 cm-1. Aldehydes are lower than C-H stretching bands, at least for the two simple molecules you indicated.
NMR is an excellent tool for identification, but FT-IR is simpler to use, cheaper and far more common in labs. Spectral library searching, if available, increases the certainty of identification by orders of magnitude compared to eyeballing the spectra. If you use vapor phase, the resolution and resulting specificity is even higher.
I just attached a comparison of the spectra of the two molecules in question.