Yes Gargling warm salt water can get rid of canker sores but it may take a few days of gargling 3 to 4 times per day with the salt water for it to be effective at getting rid of the canker sores.
The canker sore should be gone within 3 to 4 days when gargling with salt water.
You can also get rid of canker sores in your mouth by gargling with Apple Cider Vinegar since the Apple Cider Vinegar is antibacterial and antiviral.
Although canker sores are not really contagious or caused by a virus the antibacterial properties and natural acids contained within the Apple Cider Vinegar can help to eliminate the canker sore in your mouth.