You are absolutely right that it is important to have an emergency fund so that we do not have to sell Bitcoin at a difficult moment and of course we must have an emergency fund before investing. There are most new investors who enter the investment but do not make their financial plan and emergency fund before entering.
Yes having an emergency fund is important when investing in Bitcoin but it's not a must to have it first before getting started into accumulating Bitcoin, what is most important at first is having your discretionary income this is what you use in accumulating Bitcoin then on the process you can think of setting your emergency fund gradually by then you have already been accumulating Bitcoin with your discretionary income either using the DCA strategy and HODL.