Original sources from the time of the movie's release, 1988, state that the film is dedicated to the "gallant people of Afghanistan".

See the BBC's The Listener volumes 119-120, page 218:

When he does pitch in it's only in order to rescue the Colonel, before becoming converted to the cause of the 'gallant people of Afghanistan' (to whom the film is dedicated). And if the previous Rambo films have been replays of Vietnam with...

And New York Times Film Review 1987-88, page 281:

"Rambo III" Is dedicated "to the gallant people of Afghanistan," and it clearly intends that its politics be taken seriously. The plot sends Rambo into Afghanistan on a rescue mission after Trautman, who has been educating Afghan freedom...

The New York Times article is from the exact day the movie opened in theaters.

Rambo III was dedicated to the "gallant people of Afghanistan" from the beginning.

The 1995 book Civil War in Pop Culture further confirms at page 152:

a note at the end of the movie states that "this film is dedicated to the gallant people of Afghanistan"

The 1994 book Vietnam war films: over 600 feature, made-for-TV, pilot, and short movies, 1939-1992, from the United States, Vietnam, France, Belgium, Australia, Hong Kong, South Africa, Great Britain, and other countries also says at page 355: