Some MCUs have got an internal pull-up that you can control directly (e.g STM32, MSP432, even AVR IIRC).
If the internal pull-up value is OK for your application, it's up to you to check (or you could provide more info).
If not, and if the I/O characteristic are not exceeded, you might be able to always leave the external pull-up in the circuit with no real adverse effects.
You did not specify if the pull-up is needed when the pin is configured as input or output (==Open Drain).
In the first case, no issue with an internal or external pull-up of reasonable value.
In the second, the usual trick for GPIOs that do not provide a real Open Drain mode is to use the Data Direction as the output register, while keeping the actual Data Register at 0: setting the DDR to output will yield a 0, setting it to input will yield a pulled up 1.