Ideally avoid dynamic memory as much as possible in C++.
if you need realloc or other similar things in c++ for a very low level tool, then using the C functions with casting is OK in c++ instead of new/delete. But you must be very careful when handing the void pointers from C's memory functions.
A good C++ compiler will consume C code without too much problem, recommended to use the C++ headers instead of the C headers. <cstdlib> instead of <stdlib.h> for example.
The machine code generated by a C++ compiler will be similar, not the same, from the code generated by a true C compiler. If that matters.
Current C++ compilers such as MSVC or GCC/MinGW will happily munch on (most) C code.
The C stdlib was inherited into the C++ stdlib when C++ was created. It isn't the current C stdlib version, C17 with C23 on the way. There are a few C stdlib features that are not part of the C++ stdlib because of that. What those features are you should investigate for yourself.