A CR is a rough prediction of how difficult a creature will be for the players to defeat. It's impossible to define a valid CR for the creature you have in mind, because how difficult it is to defeat is primarily based on the players' choices. You can't predict how your players will make those choices, which means you can't predict how difficult it will be for them to defeat this creature.
Let's assume the creature starts life with stats around CR 1/4 in power. Taking into account a fairly standard party of 4 level 1 characters, let's think about some scenarios.
If your players kill it immediately, they probably won't even notice that it had any special abilities. We'll call this case 1.
On the other hand, let's assume that it was mixed in with a bunch of other weak enemies, and your players happened to leave it till last. And let's be generous and assume that in that time, its damage and HP rose to that of a CR 3. We'll call this case 2.
In case 1, your players lucked out, and as a result, got an easy fight. In case 2, your players were unlucky, and probably got wiped out as a result, but let's be generous and say they scraped a win. One of these fights was basically effortless, and one was extremely difficult.
Now, let's assign the creature a CR of either 1/4 or 3, and examine the results.
\begin{array}{c}
\text{Assigned CR} & \text{Case 1} & \text{Case 2} \\ \hline
1/4 & \text{Easy, very little reward} & \text{Incredibly difficult, hardly any reward} \\
3 & \text{Easy, hugely inflated reward} & \text{Incredibly difficult, well-deserved reward} \\
\end{array}
3 of these scenarios just kinda suck. In Case 1 | CR 1/4, your creature's fancy abilities didn't even matter, and the extra work you did was pointless. In Case 1 | CR 3, that's still true, but now the players get a bunch of XP for no reason. In Case 2 | CR 1/4, at least your creature got to see some play, right? But your players are going to be pretty annoyed when they finish the hardest fight they've ever seen and you say "OK, 50 XP each."
Finally, in Case 2 | CR 3, the players face a crazily tough fight, and eventually triumph. And they get a great XP reward, and everyone's happy. They're happy because they beat a tough fight (very satisfying in itself) and got a bunch of XP (Yay!). You're happy because your fancy creature got properly used.
So, if assigning it a CR of 3 is the only method that leads to a good result, there's the answer, right? No, not really. It's still a matter of luck whether the players get an easy fight or a tough one. Ok, so how about if we make the special guy visually distinct, or call it out when he grows in power? Well, then the players will just attack that guy and get an easy fight. Hmmm...what if we give them a Perception check to notice it? Great, now we're back to luck.
So if you really want to do this, I wouldn't recommend giving it a static CR. Give your players XP based on the fight that actually happens, not the one that could hypothetically have happened if they did/didn't prioritise the special creature over the rest of them.
Now, all of that was just about XP reward. What about balancing encounters? Well, if you were paying attention to everything else I've said, you might have noticed a theme. It's impossible to predict how difficult this creature will be. That means that it's impossible to create a balanced encounter around it.
Of course, the "balanced encounter" is basically a myth to begin with. You can't predict what the dice will do, and you can't predict what the players will do. If you want to throw this creature at them, go for it! Just make sure you're prepared for the possibility that it will be inconsequential, a TPK, or anything in between. And I feel I have to point out, that means making sure your players are also prepared for the possibility of a TPK.