"My brother works on the harbour" should be accepted. In UK English we would probably say "...on the docks", but I used harbour to be consistent with the translation provided during the exercise
Why is it "Hun arbeider på en fabrikk" but "Broren min arbeider i havnen"? Is there any rule?
Use of prepositions is idiomatic, in English, Norwegian, and probably any other language you study. In other words, there is no rule, just learn each case.