I've currently got rims of ETRTO 584 19mm with 2.1" tyres. I'm looking at buying new tyres but was thinking about going up to 2.25" and 2.4" if possible (don't want to have to return the tyre). Is this doable?
Presuming you have the clearance to go bigger, your 2.1s are already pushing at around the reasonable limit for your rim. Despite the modern focus on internal width, another good rule of thumb is that handling and tire security/lifespan can begin to suffer once the tire is twice the size of the outer width, which is almost always the inner plus 5-7mm.
There is not a sudden binary between correct and too wide. Past a certain point, which is basically the point you're at now or a little bit narrower, the tire increasingly wants to flop around under load, creating a squirrely ride feel and disrupting handling. This effect is much more noticeable the more aggressively you're riding, i.e. riding casually is a completely different question than actually mountain biking. In the worst case scenario, going too wide and then riding aggressively (or going way, way too wide in less aggressive riding etc) can have you roll a tire.