Gravitational-wave constraints on an effective-field-theory extension of general relativity