Employees can't be retained all the time only by offering a salary hike. Employee's retention directly proportional to employee satisfaction. Dissatisfaction arises because of many reasons like salary issue, role issue, org culture issue, reporting issue, management issue, work overload issue and many more reason.
Hence it is HR's duty to identify the reason behind such steps taken by employees and take required actions.
Now replying to your query. .....yes you can retain employee by offering salary hike. But do this only if the employee is a performer and underpaid as per his calibre or if upon his separation, the performance of the department, which he belongs to, may substantially go down . Otherwise don't offer any salary hike, else some/few employees will try to get their salary hiked simply by putting resignation.
There are cases , where HR is bound to retain any such employee because of the scarcity of the resources for the said position. So you need to note on this fact also.
Regarding sue, the other company can neither do anything with your company nor with the candidate. Offer letter normally doesn't carry any legal T&Cs so no boundations at candidate's part. But now a days some real estate companies and may be others also started offering a combined offer letter cum appointment letter prior joining or on the day of joining. If it is so for the new company, then the candidate need to abide by the T&Cs mentioned in the letter else the company may take action against the candidate. You company is safe in any case.