I have single wall rim that is bent inward about 3mm on the areas marked with red. Is there a way to fix it? How I go about it? It's a cheap bike; I don't want to invest more money into new rim, and I need to be able to tighten the spokes.
Yes - start by lubricating all the nipples with penetrating oil, and then back off the red areas and tighten the green areas, a half turn at a time. As the wheel comes back into round, check laterally and vertically.
If the rim is bad enough that it wouldn't be mostly-round with no spokes, its super-hard to make it round on a wheel and the resulting wheel is likely to have maintenance issues in the future.
Your other options are to find a better wheel in your spares and swap, or do rim-swap. It all depends how bad that 3mm is, but 3mm is a lot for vertical damage.
Update: Rims are really tough. I've once tried to break a dead one by bouncing it off the ground with force. The rim doinged back into the air with minimal damage.
To have bent it 3 mm toward the axle means it suffered an enormous hit, and has permanently deformed. It may be possible to improve, but there will be spokes with deformation now and they will eventually fail.
If you loosen the spoke nipples where the rim is low, and then crank hard on the spokes where the rim is high, it should improve but I doubt this rim will ever be good. And it will likely suffer broken spokes in the future even if you can get it running true.
Advise would be to replace the wheel if you can do so.
You will need to assess for yourself whether the rim material and construction type is reasonable to try this on. There are a number of tools and methods that do it, but they more or less are specific to steel or very basic, single-wall aluminum rims. I haven't really done it myself.
To improvise a tool, you would probably have it be in this conceptual vein:
Start by getting the wheel into a state where its tension is low but existent, and make the thread engagement uniform. In other words, it needs to be in a state where no variance in thread engagement has been introduced to try to correct the radial dips. That is important and the process won't work otherwise. You need to see where the low spots on the rim itself are, and variance in thread engagement will mask that.
Make any small adjustments needed to get it laterally true, again while ignoring radial. You can then find the optimal tool contact points by putting it on the other side of the rim from the apex of the radial low spots. Find the worst section, make a small adjustment, then go on the next worse until it can't be corrected with the tool anymore. At that point attempt to true the wheel as normal, using normal radial truing to handle whatever the tool couldn't do.
Did it get bent in an accident or is it merely a case of bad manufacturing tolerances? Is it a front or a rear wheel? Rim brakes or disk brakes?
In my experience bad rims can make it much harder to achieve proper tension on all spokes and get it sufficiently true and round. It’s less of a problem on symmetric wheels because there you have more leeway with the spoke tension. On a symmetric wheel you can put 200N less on one spoke and it’s still fine. If you do it on an asymmetric rear wheel where the non-drive side often only has ~700N tension to begin with it’s not good.
With disk brakes a bit of wobble isn’t as much of a problem.
A big question is also how much load will be on the wheel and how important reliability is for you. Fully loaded touring bike for a trip through Africa or just a commuter where a broken spoke is merely an inconvenience?