Well I've never had any trouble and have always seen plainly obvious non-muslim / western tourists walk around with no issues in Qom, and have heard numerous similar stories from Mashad.
Obvious caveat is they were men.
Not sure how loose they are with women in that regard.
I'm not sure what you mean about "religious guards" but even if they did exist I can't imagine them being anything other than polite.
In Mashad there is an excellent "foreigners & pilgrims office" which will provide a full individual guided tour with really friendly helpful english speaking (and other language) guides, who can give a really good insight into the place and shia't islam.
They'll even let you pilliage their library for all sorts of books in Islam, Shiat islam, the revolution, writings of khomeini (as well as some dubious books like Henry Ford's The Eternal Jew) for free.
Don't worry about some sort of kalashnikov armed zealots hassling you, think of it as visiting the vatican, there is only one room you maybe not be allowed in which is the tomb room itself, but once you've seen one Shi'at shrine inside you've kind of seen them all anyway.
As for visiting Qom, you're probably best doing it simply as a day trip from Tehran, take a savari (share taxi) and they'll probably drop you off right at the shrine itself, you can walk in, take a look around, have lunch and then go back to tehran in time for an afternoon walk. :-)
A chador woldn't be hard to buy, but you'll look a little silly with one, just buy a manteau, if you need one, they'll probably have them for borrowing, like the skull caps at the western wall in Jerusalem.