I took this phrase from Conversational American English. I.e. the sentence
I have to wash my hair.
I'm familiar with that phrase from a cartoon Spongebob Squarepants (I don't remember the episode) and at first I thought that the phrase is used to tell that the speaker has to go or signals the end of the conversation, I thought so, when Spongebob says that phrase to Sandy when she offers him to be the subject of her research and he runs.
However, in the book I've mentioned earlier, it's listed in a group of sentences entitled turning someone down. Does that mean this phrase is used to reject or say no to an offer? But I still can sense the phrase can be used to say something similar with 'I need to go now'. How is it? I want to prevent something awkward happens when there's someone who doesn't know this phrase and he/she replies 'use my bathroom' instead.