While your medical license does enable you to practice MEDICINE and SURGERY, in general, most savvy consumers are now looking for those who are BE/BC in their respective, residency trained fields. In addition, most hospitals and other institutions won't hire someone without the appropriate training.
Therefore, while a surgeon could technically practice FP, it isn't advisable in most cases without formal FP training, and vice versa. Working in the ER is a different matter - most ERs will hire locums in fill in the schedule, and you don't necessarily need to be EM residency trained to get the position, only licensed.
Bottom line is that there really isn't any restriction to you, in your private practice after residency, from practicing a field you aren't residency trained in, but you would not be advised to do so and may have trouble getting reimbursed for procedures/practice you aren't really trained for. You won't likely get malpratice insurance for fields you aren't trained in/procedures you weren't trained in, and may open yourself up to litigation.