If you have a canker sore and want to use salt to get rid of the canker sore then that's fine and it will work however you should not put salt directly on the canker sore because it can make the canker sore worse.
What you should do is add some salt to some warm water and gargle with the salt water to get rid of the canker sore.
Another remedy for getting rid of canker sores is to gargle with Apple Cider Vinegar as Apple Cider Vinegar is antibacterial and antiviral which can help to cure the canker sore.