Q.rust fungi on tomato
Can you cut off the part of tomato with rust and eat the rest?

Rust Fungus is not a common Tomato disease.
It could be another type of issue on the fruit itself, Bacterial Canker can cause tiny yellow spotting and Cloudy Spot caused by the Stink Bug can appear as a yellow rusty area on the fruit.
Neem Oil can be used to treat the plants and fruit.
Depending on the severity of the damage to the fruit it may be edible.
If you do have Rust here is a link that has more information as well as a few other links.
https://www.gardeningknowhow.com/plant-problems/disease/learn-about-plant-rust-disease-and-rust-treatment.htm
https://www.gardeningknowhow.com/edible/vegetables/tomato/tomato-diseases.htm
https://www.gardeningknowhow.com/edible/vegetables/tomato/tomato-bacterial-speck.htm
https://www.gardeningknowhow.com/plant-problems/disease/plant-disease-transmission.htm
https://www.gardeningknowhow.com/plant-problems/pests/pesticides/neem-oil-uses.htm