Can 一会儿～一会儿 be replaced with 有时候～有时候?
No, they cannot. 一會兒 has two meanings:


Expressing that an action will be done soon. E.g. 我一會兒去圖書館, I will go to the library in a short while.
Sometimes, but in the sense of someone being unable to make up their mind about something, or about a lively/chaotic situation which can't be described clearly, as in your examples given in the question.


有時候 cannot be used in your examples. The meaning sometimes for 有時候 is more in the sense of occasionally rather than your examples. Compare the following two:


他有時候打籃球，有時候踢足球 (He plays basketball and soccer, literally He sometimes plays basketball and sometimes plays soccer, typical sentence which describes someone's varied weekly activities)
他一會兒打籃球，一會兒踢足球 (figuratively He plays basketball one week, and goes and plays soccer the next; but still literally He sometimes plays basketball and sometimes plays soccer, typical sentence which describes someone (1) being unable to commit to an activity, or (2) being extremely busy and not stopping to take a break)