If I still have the squealing then it's definitely the brakes. Correct? Not the pads/rims.
IMO, not necessarily. But changing the brake mechanism might work.
Before buying a new brake mechanism, if this is possible and not too hard, it might be worth swapping your brakes front to back to see if that changes things.
Or swapping just the brake pads.
I have (or have had) squealing brakes on my bikes lots of times. Often I only bother to try and do anything about when my wife complains, as she really doesn't like the noise.
Sometimes squealing goes away with time. Or wet weather.
Sometimes it comes back after a period of quiet, usually if I haven't used the bike concerned very much.
Sometimes cleaning the rims stops it.
Sometimes "refreshing" the surface of the brake pads by filing, sanding or grinding works.
Sometimes toeing in the front of the pads works (others report getting the pads parallel, or doing the opposite and toeing them out).
Sometimes changing the make or model of brake pad works. Aztec pads squealed on one of my bikes, so I put Koolstop Salmon on and no squeal. And I then used the same Aztec pads on another bike, where for some obscure reason they didn't squeal.
Sometimes changing the brake mechanism works. I noticed this when I replaced some very worn Mafac cantilevers (more than 32,000 kms and I could feel some play at the pivot) with more modern Shimano ones about 20-30 years ago. The Shimano's are now at about 34,500 kms and still not squealing.