Putting class ranking in CV, but against dept guidelines
So, you put it on your CV, the future employer does what employers do and phones the institution to check details of awards, years etc.

BOOM - the institution does not confirm you were "top of the class" as that is just not done.

Now the future employer is confused - what else may be wrong on your CV AND your referee is pissed at you as well.

Do you really want to go there?