Or some advice on where near Bath is affordable.Maybe.
Trowbridge and Chippenham are both much cheaper than Bath, but then you're in Trowbridge or Chippenham.
Twerton used to be the dodgy end of town but more recently has seen more young professionals moving in and is getting nicer. It's about as far out of town as you can get and still be in Bath, but Bath is a small city and you, I assume, can ride a bike so that shouldn't matter too much.