Scottish councils have been told they can divert funding to help coastal businesses and charities struggling because of coronavirus.