edit: Nathan's answer makes an excellent point - this answer presumes you can get to the back of the worn area, which may not be possible. Measuring through the valve hole might be a challenge.
In your position I would measure the rim's thickness and make a judgement based on how much metal is there.
Consider that the rim is under a lot of sideways stress from tyre pressure, and a weakening will allow the lip of the rim rim to flex, eventually failing catastrophically.
Rim brakes do wear out the wheel's rim over time, so this is not unknown, though it normally takes many years before a rim is worn out.
To measure your rim thickness, you could simply "feel" it between thumb and forefinger, and compare with a known-good rim.
To do a quantifiable job, you'll want some special calipers. Normal vernier or digital calipers don't do the job because the rim probably has a lip to hold the tyre's bead.
There are many great options listed at https://diy.stackexchange.com/questions/133035/how-do-i-measure-the-thickness-of-something-with-a-lip-or-frame reproduced here:
- Dental caliper:
- Neck caliper:
- Variation on the above - make some pointed probes that go onto a regular digital caliper, and use the "zeroise" function:
Or you could 3D print some plastic ones.
- Double-ended, or Indirect caliper - these allow you to take the measurement from "outside" the part:
- Ultrasonic thickness testers (expensive)
If there is "enough" metal then you're probably good to ride these wheels.
If there is a lot of extra metal you could consider refinishing the damaged part, purely for aesthetics. I'd consider a light sanding to add tooth, and then several thin coats of hard-wearing spray paint, alternating with light sanding, just to hide the damage. And then a clear-coat on top for durability.