Kanchanaburi is not short of places to stay. The main focus of accommodation is in the central part of the town, which is also where most of the food options are, as well as the main War Cemetery and train station.
A popular option is a raft house on the river, where you will be rewarded by being gently rocked to sleep and some quite spectacular sunset views. The downside is that depending on the time of year and week that you visit, you may find your sleep disturbed by the pounding beats of the party boats that go up and down. These seem to be more prevalent on the weekend.