Is it ok to give gas while releasing the clutch?
Yes, but your goal is to give exactly the right amount of gas.
The thing to remember is that the clutch is a consumable part (it's really a whole system of parts that can be consumed but let's pretend that it's a single unique piece for the sake of discussion). As such, it has a finite supply of work that it can do over its service life, useful or otherwise. To clarify, this is what it means to slip the clutch:
Between these extremes of engagement and disengagement the clutch
slips to varying degrees. When slipping it still transmits torque
despite the difference in speeds between the engine crankshaft and the
transmission input. Because this torque is transmitted by means of
friction rather than direct mechanical contact, considerable power is
wasted as heat (which is dissipated by the clutch). Properly applied,
slip allows the vehicle to be started from a standstill, and when it
is already moving, allows the engine rotation to gradually adjust to a
newly selected gear ratio.
As noted, the clutch is a friction-based part (rather than a direct gear). The above quote means that your goal as the driver is to attempt to ensure that the clutch is spending more time in a static friction mode (i.e., where the frictional surfaces of the clutch are turning at the same speed, pressed tightly together) rather than a kinetic friction mode (i.e., where the frictional surfaces are turning at different speeds and are slipping past each other).
This means that the answer to your original question is that it is ok to give exactly the right amount of gas when releasing the clutch pedal. Any more or less than the optimal amount will lead to some slippage of the clutch. Some slippage is to be expected, with wear increasing super-linearly as the difference between target and actual revs increases.
The better you are at rev matching, the longer your clutch will last (and the more comfortable your passengers will be).
tl;dr: You have to slip the clutch from a stop. In higher gears, your goal is to avoid slipping the clutch. You do this by matching engine speed to transmission speed before releasing the clutch pedal.