replacing a duplex outlet
Pigtailing them (from a wirenut connecting the two wires and the pigtail) is a perfectly good approach, yes.

Check the old outlet to see if (likely) the tab connecting the two brass terminals is broken/removed. If it is, do the same on the new outlet before installing it.