David Prowse did duel in Star Wars (1977) but was replaced in the next two original trilogy sequels by fencer/fight choreographer Bob Anderson
I am trying to dig up as much information as possible, but based on my memory of this all, there are a few factors that I have dug up details on:
Details of David Prowse not Dueling in Later Films was Kept Secret: According to Mark Hamill in a 1983 interview in Starlog magazine: “Bob Anderson was the man who actually did Vader's fighting. It was always supposed to be a secret, but I finally told (director) George (Lucas) I didn’t think it was fair any more. Bob worked so bloody hard that he deserves some recognition. It’s ridiculous to preserve the myth that it’s all done by one man.” The reason this was a “secret” is George Lucas felt it would hinder David Prowse’s career if he was seen as not being in the Darth Vader suit all the time. They wanted to preserve the myth that Darth Vader was played by one man.
Bob Anderson’s Assistant Clarifies it All: Leon Hill—Bob Anderson’s former assistant—bluntly states that Anderson stepped in during the key fight scenes in The Empire Strikes Back and Return of the Jedi: “David Prowse wasn’t very good with a sword and Bob couldn’t get him to do the moves. Fortunately, Bob could just don the costume and do it himself.”
So in the end—if you read between the lines—David Prowse did duel in the first film, but didn’t in the other two films…
Here is a pic of David Prowse and Alec Guiness practicing for their duel in the Star Wars (1977):

And here is a pic of Mark Hamill and Bob Anderson practicing for their duel in The Empire Strikes Back (1983):
