it depends with what you mean with block port 22. port 22 as in the port on which the BIG-IP listen for management? if so, no then i don't believe you can apply iRules on that.
if you mean block port 22 on a virtual server then it could be possible. from what i found the Quova (currently Neustar) should be able to provide state information. so you could write something simple that only the strings from whereis (see below) for the states you want to allow go through and other connections are closed.
see: https://devcentral.f5.com/wiki/iRules.whereis.ashx