Hello

1881 census was on 3rd April so as George was already a Widower it is likely that Margaret had died before the Apr-Jun quarter. There's another possibility in 1881 Jan-Mar quarter
Swansea volume 11a page 462 Margaret Williams age 34
Best bet is to contact Swansea Register Office and specify that she is the wife of George and possible address in Swansea Town. They will let you know if this is the correct death so that you can buy the certificate.
Kind Regards
Morgan