In some cases, but note that (a) this is only true for a tiny handful of homophones, and (b) the distinguishing accent varies by region.
E.g. "hashi" famously can mean bridge/edge/chopsticks depending on accent, but which accent has which meaning is different in Tokyo vs Osaka.