I believe that there are two pieces of evidence in support of the Ruyi Jingu Bang having a degree of sentience, which are discussed nicely here.
The first is when the Monkey King (Sun Wukong) goes to the realm of the Dragon King. The Dragon Queen remarks that:
"These past few days the iron has been glowing with a strange and
lovely light. Could this be a sign that it should be taken out to meet
Here "the iron" refers to the iron pillar that Monkey selects as his weapon, which turns out to be the Ruyi Jingu Bang. It appears to have been aware of the imminent arrival of its new master (which would seem to indicate not only a degree of sentiency but also an ability to sense the future).
The Ruyi Jingu Bang obeys Monkey's orders to grow or shrink, but as argued in the SF&F SE this is not in itself a sign of sentience - smartphones, for example, also have this ability to obey orders in this way. However, later Monkey recites a poem in praise of the staff's properties:
Its name was one Rod of Numinous Yang,
Stored deep in the sea, hardly seen by men.
Well-formed and transformed it wanted to fly,
Emitting bright strands of five-colored mist.
Describing the staff as "wanting to fly" (i.e desiring to be free) surely indicates that it has wishes and desires, implying its sentience.