If your supervisor's guidance is to put them down as a referee, then you should put them down as a referee (i.e. it's a good idea to do so). The fact that your reference comes from someone within the department is in no way hidden from the other people involved. It is entirely transparent.
Turning this on its head, it would be very odd indeed—assuming that this is a postdoc position, or one you are applying for soon after your PhD— if you did not use your supervisor as a referee. In fact, this might look a lot dodgier than if you do. Think about if you were applying for a job and didn't give someone from your most recent employment as a referee. It raises questions.
How to counteract any bias (or perhaps sound knowledge about you) that may enter into the hiring process, given that you are the ex-supervisee of someone in the department, is a question for the hiring committe to work out, not for you. And remember, whether your ex-supervisor is your referee or not, they are still your old supervisor and you are still their ex-doctoral student. There is nothing you can do to change this. The reference makes no difference in this regard.
Good luck with your application!