There are a lot of people who are totally against playing in casinos and others who are happy with it. The decision as to whether you play should be completely yours, but you do need to be sensible. You need to think about how much money you can afford to play with and make sure that you only spend money that you can afford to lose. You need to think of it more like you are paying to play a game. You pay to play and then if you win it is a bonus.
If you think that there is any risk that you will make an unwise bet, perhaps spend more money that you can afford or enough to make you want to keep playing until you win again, however much you need to spend, then you need to not start playing at all. The casino does not want anyone to get in to trouble with money either because it makes them look bad. They design the games so that they are fun and you enjoy spending your money on them. As long as you go in to the game expecting to have fun but not to win, then you should be fine. Just like when you go to a proper casino and restrict yourself on how much money you can spend, you need to do the same when playing online.
The only problem with an online casino is that you are not actually handling the money and so it may feel less like you are spending it. However, we are all used to using credit cards these days and we should try hard to visualise how much we are spending and the consequences (if any) of spending that money. Just make sure that it stays fun and you are only spending what you can afford and you will be being wise.