There were probably a lot of Margaret Rankins, but if you are asking about the Peggy who m. Thomas Witherspoon, then the answer is no. She was not the daughter of Samuel.
She was b. ca 1780, the daughter of James Rankin who d. on/after the Battle at Ramour's Mill on 20 June 1780. Her mother's given name is unknown, but she was the sister of my direct ancestor, James Alexander b. 8 Apr 1749 Pennsylvania and d. 6 Dec 1835 in Iredell County, North Carolina.