does the rank addon you use include the ply:PlayerRanks meta function? This is not something that is built in by default and it is not a part of ULib.
If that function actually does exist, then yes, that is how you would do it.
if ply:PlayerRanks[17] then
ply:Give("weapon_crowbar")
ply:SetMaxHealth(150)
end
the 150 being whatever you want the health to be.
that code would go in the PlayerSpawn hook of the gamemode or you could hook it separately to avoid breaking anything.