When you install Avast (Custom Install) you should be able to give an installation location. That said programs have to have elements in the OS drive, so some parts of avast would still be there.
If there isn't any room/limited on C: then you really should be looking at what you have on C:\ and or upgrading your hard drive as this (less than 15% free space) can cause other performance issues.