The German chancellor has indicated he might sue after he was accused of a "racist outburst" in a birthday party discussion.