I don't know why you are calling it the same PC as XP mode isn't a separate OS, but running a program in XP Mode (a compatibility thing) under win7.
The only way would be running a VM (Virtual Machine) installation of XP, that would effectively give you two different OSes win7 and XP and you haven't said that is the case.
So I have to admit to being confused as to what it is that you are doing.
Are you running a VM installation of XP ?
If so, then you would (and should) be able to install avast in that VM environment, I'm not entirely sure how this plays out in terms of your license. If each environment (win7 and VM of XP) would require a separate license for each, but me (not an avast employee) would think it is OK, given that you can't run both environments simultaneously.