When I was young, I thought following the rules and procedures was how you got ahead.
Now I realize that while those are not unimportant, what's more important is figuring out how things actually get done and use those processes to get things done. To also help out those who need help getting things done where you can so that they'll help you. It's always amazed me how much people just get shit done regardless of rules and policies.
Also, document everything to make sure can show what you contributed and show that you did your part. If someone like a boss asks you to do something that's not according to written procedures, follow up with an email - "Just wanted to confirm we spoke about X and you told me to do Y" type of thing.
Work will drop you like a hot potato if they decide to let you go. All that extra work you put in unpaid - nobody will remember it, even if they remember it, it's not worth all of that time. You don't have to totally "act your wage" and do the minimum, but do NOT expend extra energy without tangible reward like overtime pay.
You can be friendl with people from work, but work is not your friend, neither are they your family. It is an arrangement whereby you give them energy, labour et cetera in exchange for pay.