I believe that when I did IMF, unlike other IMNA events, they did dump special needs bags...at least the bike ones, can't recall about the run ones. I certainly wouldn't risk a pair of shoes until I found out for sure (its probably in the triathlete handbook).
Can a ref cite/dq you? Sure - its definitely within their role and within the roles. Technically, the tossing of your shoes at your wife "may" violate the rule prohibiting triathletes from disposing of anything during the race except at specified areas (generally aid stations)...but if she is at special needs where you are allowed to leave stuff anyway - that may be OK (I can't give you a definite yes or no). But its the taking of the second pair of shoes from your wife that would be seen as the outside assistance. The only aid of any kind must come from official race support - not family or friends. I know that it may seem relatively minor...but if those new shoes saved your feet enough to let you grab that last Kona spot....that triathlete who did the whole race without getting fresh shoes and missed that same spot by a minute might be upset. Triathlon is intended to be an individual event - thus the 'no outside assistance" rule.
At the pre-race meetings, I'd check with Charlie Crawford (head official). He's really good with answering one-on-one questions after the general rules presentation. - or you may even be able to e-mail him directly now and get a response. I believe that his e-mail is:
crawfcj@gte.net. Good luck. Alan