  Detecting gravitational waves from coalescing compact binaries allows us to
explore the dynamical, nonlinear regime of general relativity and constrain
modifications to it. Some of the gravitational-wave events observed by the
LIGO-Virgo Collaboration have sufficiently high signal-to-noise ratio in the
merger, allowing us to probe the relaxation of the remnant black hole to its
final, stationary state - the so-called black-hole ringdown, which is
characterized by a set of quasinormal modes. Can we use the ringdown to
constrain deviations from general relativity, as predicted by several of its
contenders? Here, we address this question by using an inspiral-merger-ringdown
waveform model in the effective-one-body formalism, augmented with a
parametrization of the ringdown based on an expansion in the final black hole's
spin. We give a prescription on how to include in this waveform model, the
quasinormal mode frequencies calculated on a theory-by-theory basis. In
particular, we focus on theories that modify general relativity by higher-order
curvature corrections, namely, Einstein-dilaton-Gauss-Bonnet (EdGB), dynamical
Chern-Simons (dCS) theories, and cubic- and quartic-order
effective-field-theories (EFT) of general relativity. We use this parametrized
waveform model to measure the ringdown properties of the two loudest ringdown
signals observed so far, GW150914 and GW200129. We find that while EdGB theory
cannot be constrained with these events, we can place upper bounds on the
fundamental lengthscale of cubic- ($\ell_{\rm cEFT} \leqslant 38.2$ km) and
quartic-order ($\ell_{\rm qEFT} \leqslant 51.3$ km) EFTs of general relativity,
and of dCS gravity ($\ell_{\rm dCS} \leqslant 38.7$ km). The latter result is a
concrete example of a theory presently unconstrained by inspiral-only analyses
which, however, can be constrained by merger-ringdown studies with current
gravitational-wave data.
