Vinegar has an unpleasant smell and if used in the pipes and u-bend it may temporarily keep them away. It can sting and would be unpleasant for the rat. Any strong smell may be enough to deter a rodent as it will make them wary that something has changed in the environment.