if it's localised and where a dog usually lies it's likely to be the dog.
Agreed.....However, sometimes the dog's presence can introduce moisture to the carpet (I know this from my own dog, coming in wet from the river and smelling a bit funky!). This moisture can then cause the same problems described above when these problem carpets are wetted. Just a thought
However, having said that, foul odours from off-gassing or adhesive are not really the same as doggy smells in my experiences.
If the rug is a tufted construction, immersion is a bit dodgy - the latex can break down causing the rug's structure to be ruined.
If it's a hand-knotted oriental, subject to dye bleed testing, walk in the park! An Axminster-construction rug should be OK to fully immerse too.
Need to know what you're doing though