please refer to the Query below and the answer given by Sayyid Sistani on his offical Site:
Question: Does masturbating during daytime of Ramadhan invalidate the fast, regardless of whether or not it leads to ejaculation? What is the penalty that should be incurred by one who does so? What is the ruling for a woman who engages in masturbation during daytime of Ramadhan, irrespective of whether or not it leads to discharge?
Answer: If a person masturbates with the intention of ejaculating and actually ejaculates, his fast is rendered invalid and he must make it up by way of qadha as well as pay the penalty (kaffara) which is fasting for two successive months or feeding sixty poor people. If he masturbates with the intention of ejaculating but does not ejaculate, he must complete the fast with the intention of pleasing the Almighty and then do it qadha.
If he masturbates without the intention of ejaculating and he does not normally ejaculate, knowing that discharge is probable and it actually happens —he has to do qadha without the penalty. However, if such a person was confident that no discharge would take place and it actually happens — no qadha is required. In all these cases, there is no difference between a man and a woman.
In short the answer is yes to all your Questions.
Ask An Alim Team