I'm gonna go out on a limb here and say no (and get away with it because you haven't asked for hard science!)
$N_2$ is smaller and lighter than $CO_2$, and neither are polar. There's no trivial way to make a membrane that would let the larger molecule through and reject the smaller. Technology does exist to filter nitrogen (used in oxygen concentrators) and carbon dioxide (as used in rebreathers) out of the air, but this wouldn't help if you're using the result as a breathing gas because you've either massively increased the partial pressures of the rest of the components of your breathing gas (which is dangerous, see below) or you've filled it with some other inert gas to make up the balance, thus negating your original design goal (and no alternative gas is perfect, all have costs and risks associated with them).
Your best bet is to make an alternate gas exchange mechanism that doesn't need to use ambient atmospheric pressure to get gas into and out of blood, ie. a specialised artificial lung (ECMO). You'd probably have to dissolve your required breathing gases into some kind of fluid (much like a liquid breathing approach) and then let the gasses diffuse across into the bloodstream across a simpler membrane.
This would be a non-trivial bit of engineering and medicine, if you wanted it to be compact, reliable and safe in underwater environments. I note that this approach was used in Peter Watts' Starfish and his other Rifters books, with a surgically implanted lung replacement. He went a step further and made it extract oxygen from water via electrolysis, too (read the link for more details and related work). If you didn't want that, you could still use it as an underwater breathing system... just take a suitable carbon dioxide scrubber and oxygen source that works with the breathing fluid, and run it as a sort of liquid-loop rebreather.
By removing ambient pressure from the equation you not only deal with gas toxicity issues, but also with some gas expansion issues when you change depth. There's much less risk of decompression sickness when there's no dissolved gasses to form bubbles in your body, for example. You'd still have to deal with keeping the lungs, sinuses and eustachian tubes pressurised (Watts' system flooded the breathing passages with saline when the artificial lung was operating), so you still have to be careful about squeezes and overexpansion injuries.
nitrogen narcosis would be absolutely deadly
Many things become deadly at high enough pressures. Acute oxygen toxicity will cause seizures, long term exposure to high pressure oxygen will damage the lungs (amongst other things). You'll need to be super careful about other contaminants which may go from being an irritation on the surface to being fatal at depth. You've also got other serious, non-biological issues, such as the fact that there's lots of extra oxygen in the air that will make fires in your habitats really exciting .
I'm disregarding High Pressure Nervous Syndrome here, since whales have found a workaround
Whales, and indeed all other diving sea mammals, hold their breath. This sharply limits how long their dives can be. It also limits the maximum amount of any one gas that can diffuse into their bodies. They also have adaptations to better fill their blood and muscles with oxygen pre-dive and limit gas transfer from the lungs at depth, reducing the ability of undesirable gasses to diffuse into their blood and then cause toxic or narcotic effects, or risk of the bends. It isn't at all clear that they have "found a workaround" in the sense you mean, because they may well simply not expose their nervous systems to the types and amounts of dissolved gasses that deep-sea divers do.
Remaining at depth and continuously breathing from some other air source will result in the "inert" parts of your breathing gas dissolving into your blood stream, something that does not happen to whales. Disregard diving mammals when considering long-term underwater habitation; they don't do it and aren't adapted for it. The longest dive by a mammal is a little over 2 hours, by something with quite different physiology to humans. I'm pretty certain that if you have whales and walruses underwater breathing equipment, you'd find that they develop a whole raft of pressure-related illnesses in due course, just like humans do.
Remaining under high pressure for extended periods of time has a whole new set of issues which are poorly understood. Have a read up on the risks posed to saturation divers for examples of this sort of problem. Changing the atmosphere composition is unlikely to fix all these issues.