Generically speaking; IT might be possible for employees in Govt/private sector..per fats and details of the individual matter.
IT is safe to seek rules and permission in writing.
You may go thru;
CENTRAL CIVIL SERVICES (CONDUCT) RULES, 1964 Page 11 of 21 2915. Private trade or employment
Rule 15 of the Central Civil Services (Conduct) Rules, 1964, no previous sanction of the Government is required for a Central Government servant to undertake honorary work of a social or charitable nature but he should discontinue taking part in such activities, if so directed by the Government. Prior permission is essential only if the Government servant seeks to hold an elective office.