Competition of resonant and nonresonant paths in resonance-enhanced two-photon single ionization of He by an ultrashort extreme-ultraviolet pulse