Is it ok to plant tomato plants in an old slightly rusty lawn cart used for pulling behind my lawnmower?
whenever I make a planter out of something like that: cart, wheelbarrow, etc... I get myself a glue-gun and line them with fabric first. However, that has less to do with any assumptions I am making about contaminating dirt and more to do with removing the dirt at a later point in time.
I would not use it. Old mowers spill oil, which could remain in the cart. You should also be sure that there were not lead (especially used during maintenance work). Acid on fertilizers could make it to release other metals and stuffs.
But you can check carefully how it is made, and which materials. In any case it should be good for flowers. Maybe start with flowers, and if it remain inert, you may use it for (non-intensive) tomatoes.