There are a couple of ways that you can do this but they are custom as well. One way that you can do this is to keep the check that is on your add to cart page that stops the user from adding more than the available stock to the cart. As for when it is in the cart you could add a new column to your cart to hold the available stock. Once you have this column in the cart you would modify your add to cart server behavior and bind the value from your recordset to this new column.
Once you have this value in the cart when you add an item to the cart you can have a calculation that will check to see if the quantity is greater than the available stock, if so set it to the available stock. The calculation would be added to the eCart calculations tab. It might look like this depending on how you name your columns:
([Quantity] > [Stock])?[Quantity] = [Stock]:[Quantity] = [Quantity]
If the column that holds the stock is not called Stock then you will need to modify this server calculation.