The alternator will have a hard time keeping the engine running when the battery cannot put out enough power. So yes, a bad battery can cause a rough idle.