No, you don't need rebar for a 4 inch slab. However, if you're planning on putting anything heavy on the slab or if it will be subject to high stress, then adding rebar is a good idea. Reinforcing the slab with rebar increases its strength and durability, making it less likely to crack under pressure.
If you're not sure whether or not your project needs rebar, it's always best to consult with a professional engineer or contractor. They can help you assess the risks and decide whether reinforcing the slab is necessary.