you really can’t do that. MIDI is musical data, and the positions of notes etc. reference musical time, not audio time. If you change tempo or meter, you change the meaning of the musical time points.t
Maybe you can’t do this in Ardour but some other DAWs like Reaper or Cakewalk do have that feature hidden about. I get that adapting the project tempo to the (absolute) tempo of a MIDI track would be a destructive action to the underlying MIDI file, but it is not generally impossible.