The correct answer is 'was having'. This is because the sentence describes an action in progress in the past that was interrupted by another action. The phone rang while I was in the process of having a bath. Therefore, the correct sentence is: I was having a bath when the phone rang last night.
Answer: was having