Controlling model tram

Why not? My model railroad is pure DC too, and I use only current sensors to detect free or occupied blocks. But indeed there are some points to consider.

There are several possibilities. You can use the full H-bridge of the 298 to be able to switch polarity for the tram. Then you need an H-bridge for each tram. By using a releay ( per block ) with two-way contact you can connect each block alternatively to one of the two H-bridges.
Or you change polarity by means of a relay and use each half of the 298 for one tram.

N.B. there are better H-bridges than the old L298.