It would depend on how strong the magnetic device is and how good the case of the drive shields the platters.
Was the magnetic device a demagnitizer or degausser whose use is intended to erase a drive? Then no, you probably can't rescue the data.
But there are companies that may be able to do it, Ontrack comes to mind. It is a little pricey, $150 for one of my clients.