Would this be clearer?

    def validate_mechanism(mechanism, raise_error=false)
      return true if MECHANISMS.include?(mechanism.upcase)
      if raise_error
        raise Argument Error,
          "Invalid authentication mechanism provided. Must be one of " +
          "#{Mongo::Authentication::MECHANISMS.join(', ')}."
      end
      false
    end