There are two approaches you could take here.
Membranes of this type allow only certain ions or particles via diffusion or passive/active transport. A dialysis machine for example uses this sort of membrane.
For ion transport, these require a carrier fluid. Oxygen, Nitrogen and CO2 are all mildly soluble in water, so we could use something water-based as the carrier. In this situation, the membrane is just a sieve with an extremely fine mesh size. Well-controlled, this mesh would only allow your selected compounds through. Sickness or mutation could cause this to malfunction in similar ways to how kidney disease affects humans.
Interestingly, this means that compounds with a similar physical size to your usual source will be allowed through. This is similar to why carbon monoxide ends up in our bloodstream. It has a similar size and charge to oxygen, and thus gets through the sieve.
To prevent poisoning via these chemicals, a secondary mechanism is present in most complex life forms.
Our liver is one of these. It uses various enzymes and chemical pathways to process chemicals in our bloodstream, and neutralise toxins. This type of filter is often employed after initial size and charge filtering via the normal input pathway (the lungs in this case).
Let me get back to your question.
Could be possible make an organic membrane for gas separation? I think there are a few of different types of membrane to complete that purpose, what type would be? And from wich material?
Yes, of course. Our lungs do this. The type of membrane you want is a semi-permeable membrane. The material used for this would be similar to mammalian veins, as they perform gas exchange in our bodies.
Use that membrane would difficult breathing? I mean, normal air has 21% O2, if the creature want to breath 42% O2 would take the double of effort complete a breathing? (Filtering something always reduce the flow and make harder to complete)
Actually, it would require a square of the effort, as pressure is force per unit area. And that's before we consider the resistance of the filter. It's infeasible for any creature to go much past its normal intake pressure due to this.
Futhemother O2, is it possible make membranes to filter CO2, CO and N?
Filtering CO with only a semi-permeable membrane is impossible, due to its similar size to O2.
Thus, to satisfy all conditions, we need some mechanism that will separate out unwanted chemicals (preferably in a way that doesn't poison the animal), and then allow the required chemicals (oxygen) into a semi-permeable membrane for a final size pass.
The setup that would achieve this is a biochemical filter that feeds into our semi-permeable membrane, and finally into the bloodstream. This has some important implications.
The creature will probably have no way of dealing with chemicals that do end inside its blood, such as dissolved CO in liquids, and thus there is a variety of liquids (and solids) that would decompose in the body and become toxic. This is the equivalent of injecting ethanol into someone. You're bypassing the liver, which would normally deal with it.
Besides this, its breathing liver (if you will), would need to be able to neutralise a variety of harmful chemicals. Due to how absurdly complex biochemistry is, there probably exists some gas that will get through the filter and come out toxic (this is why methanol kills humans but ethanol does not. Neither are very toxic in the first order, however the same chemical pathway that turns ethanol into vinegar, turns methanol into formic acid, which is quite toxic).
Thus it's impossible to have a creature that will survive all airborne contaminants. There will exist some situation in which they'll need a gas mask. However you can have a creature that can deal with most commonly found contaminants on the planet upon which they reside, with analogues to those contaminants being toxic.