How can "whether I wanted to rent the flat" be a direct object if it is a subordinate clause? (I thought an object had to be a noun, noun clause, noun phrase, or phrase that can act as a noun such as prepositional phrases do.
"whether" is of course short for "whether or not" . I have learned to call it a "function word" like "that" in "He said that I should rent a flat". It has the function of saying, "Here comes a noun clause."