Put simply, this is spray on glue. Once it dries, you won't be able to breathe through the fabric. It'd be like trying to breathe through a solid sheet of plastic. Short answer: no
When I searched for the "HDX Multi Purpose Spray Adhesive" on the home depot website, Pick Up In Store (Central Jersey area) displayed "0 in stock", "Check nearby stores" displayed that one store not anywhere close to me as having only 1 in stock and the rest (stores were in other towns) as "This store has limited quantity stock. Please call to confirm availability". your only option for now seems to be to have it shipped.
As long as the carpet has the proper backing, (rubber, polyurethane) this glue will hold the carpet down.
The HDX Spray Adhesive can be used on many types of foam materials but be careful. This product contains solvents that can attack the foam if not used properly. Shake can well and test for compatibility first before starting application. It is important to keep the can and spray moving to avoid runs or any buildup of adhesive. Large concentrations can attack the foam. You may need to do two light coats depending upon permanency needed. Allow to adhesive to dry according to directions before bonding the two substrates. Also, to get a good bond you would need a continuous surface, which the foam may or may not have.
Not all spray adhesives will work with memory foam; some may even cause it to dissolve or disintegrate, causing even more damage. The HDX Multi Purpose Spray Adhesive has not been tested for this type of foam material and therefore would not be recommended for this purpose.
Given how porous cork is, I'd say it will work for what you plan on doing.
It is possible use this spray adhesive. Keep in mind cork is a very difficult material to bond or to maintain a good bond to a given substrate. It is important that sufficient adhesive be present to effect a good bond. Because this is a spray contact adhesive the use of it might require several coats to be applied to the cork surfaces allowing adequate dry time in between each coat because of the material absorbency. The base bonding surface should also be coated. Be sure to follow instructions for adequate dry time between coats and before laminating. Repositioning may not be possible so be careful.
There are several common solvents such as turpentine, mineral spirits, some citrus-based cleaners or adhesive removers which are readily available. However one must exercise care and caution when using solvents on plastics and/or vinyl by following the solvent manufacturer’s precautionary measures and instructions. Always test a small areas first to determine suitability and acceptable results. Remember that removing overspray is always better prevented then removing after the fact so there are not guarantees depending the extent of the situation.