The 34-year-old, who has 83 Welsh caps, has previously said that he plans to retire from international rugby after the tournament in New Zealand.
"I have said there's a possibility that after the World Cup I may have played my last game," Williams said.
"If we don't do well on Saturday, it could be my last game.
"I don't want to get too emotional about it yet. I don't want to finish playing rugby for Wales. I never want to, but you don't get many wingers playing after 40 and doing well."
The Ospreys veteran, who holds the record for Welsh Test tries with 55 to his name, also praised strength in depth of the Wales backs – and the competition that it creates.
"We are very privileged to have a great back three," he said. "We've been doing our fighting on the training paddock to see which back three are going to get there.
"I said months before the World Cup started that this certainly was the most exciting Welsh squad I've been involved in, with a lot of youngsters coming through at the right time.
"There are some great players coming through, so that bodes well for many years to come."
Wales face Ireland in the Rugby World Cup quarter-finals tomorrow (Saturday).