Yes, since... AD17 or 18 or so? You can add schematic parameters, which are pulled into PCB and can be queried by rules. I'm not sure offhand if ClassName is one of them.
Component class is certainly one (since old versions), and you can use component class, pad naming and optionally footprint naming to select relevant pads.
You can also construct rules by size, which is probably a more common case anyway. My designs often have a, for example:
IsPad AND (AsMils(PadXSize_AllLayers) > 60) AND (AsMils(PadYSize_AllLayers) > 60)
query in them for a PolyConnect rule, and set to a modest increase in dimension, say 20 or 30 mils spokes, with 10 being the default.
Keep in mind that direct connection is rarely necessary, and simply increasing the size of the thermals will do. Direct connects are a hazard for poor reflow soldering. You can calculate the conductance of a thermal spoke, and I think you will find it isn't substantial under most cases, is merely worth increasing (but not eliminating) under more demanding cases.
Ed: your search for a more general rule is a worthy one, because not only are pad classes just another step you need to ensure is made, but also as component names or IDs are updated in the course of updates, class assignments can be lost, or confused accidentally. Pad classes are at least better than directly naming pads in rules (e.g. "(Name Like 'P1-13') OR ...") but still not all that reliable.
Tim