Is A kasse mandatory when paying for Union?
first off all it is very important to be aware, that membership of IDA does NOT include unemployment insurance. IDA is a UNION, not an Unemployment Insurance Fund ("A-kasse"). Union and A-kasse are two different things.
The A-kasse membership can be compared to an house insurance or other insurances you buy - it is an insurance against unemployment and gives you unemployment benefits ("dagpenge") in case of unemployment IF you meet the requirements for being eligible for benefits.
The requirements are explained on this page: https://a-kasser.dk/benefits.html.
So to answer your questions:
1. Yes it is true - you need to member of an A-kasse to be eligible to claim benefits ("dagpenge").
2. I know that IDA recommends the A-kasse "Akademikernes". And I would do the same. With an MSC in Mechanical Engineering, Akademikernes is the right choice for you.
3. If you had been member of an A-kasse, there are some extra things to consider, before it will be possible to say if you would have been eligible for unemployment benefits.
As an non EU/EEA citizen, you first of all need the work permit. AND the work permit must allow you to work FULLTIME and stay in Denmark also AFTER you finish your current job. If your work permit is constrained to a particular job, it will not give sense to be member of an A-kasse. Because when you claim benefits, you will need to leave Denmark, and therefor can not benefit of your Unemployment Insurance.
If you have this general work permit, then the next thing would be to check if you meet the other requirements for being eligible for Unemployment benefits. As mentioned before - these requirements can be seen here: https://a-kasser.dk/benefits.html.
On this page you can see that one of the requirements is that you must have been member of an A-kasse for at least 1 year. Furthermore there are the income requirement - you must have had a certain income during the last 3 years.