TL;DR It may or may not be fine to play and host a dedicated server on 8GB of ram. It also depends on wheter you have a GPU or an APU. As well as the power of your APU if you dont have a GPU. You can try it out but make sure you dont use a HD Texture Pack. And dont use any shaders. You might have to give up on fancy quality settings as well.
This is to clarify how minecraft server and client works.
As for the Server, ram is primarily used to store chunk information. Having few players does not mean low chunk information especially when you are playing a tech pack (A mod pack full of mostly tech based mods). There lies the existence of chunk loaders and quarrys that load chunks. In any case, the server should not use more than 2-3gb of ram and that is the case for my server. (SolitaryCraft, 250+ mods, 3-4 players)
As for the client. It also stores chunk information to render to the user. It is also used to store texture information for the renderer to show to the client. I am unsure if the renderer uses VRAM or RAM to store its post rendered stuff. Anyways, by my guess the client shouldnt exceed 3-4 gb of ram as well. UNLESS you use HD texture packs. A 64x texturepack can easily push the ram requirement to about 5-6gb
Thus if you are hosting and playing on the same machine, and using a dedicated server instead of "Publish to LAN" you will use more ram than playing single player. Past experience tells me that hosting a dedicated server and playing on the same machine with Less than 8 GB of ram is a bad idea for tech packs. 8 GB should be fine depending on the mod list and the prerequsite that you dont use HD texture packs.
The CPU in both cases is used to process the ticks on the server. To briefly explain ticks, it is the passage of time on the server. Each tick should take less than 50 ms to process. This is due to the fact that there 20 ticks make up a second. Having low processing power slows the tick calculation down which results in a slow passage of time. Every machine, every chunk loaded with things going on is gonna eat into your CPU requirements. I would suggest you install a lag profiler to identify if you are running low on tick rate.
The mod suggested is OPIS by ProfMobius. You would also need a dependency called MobiusCore. THe mod can be installed on the server and the client. It does not need every client to install it to connect to the server. You as the host can install it and monitor which machine is lagging the server the most and do appropriate actions to work around it.
This is a part where it gets abit complicated. I will go into 2 possible cases.
If you have a separate GPU it would help remove load on the ram while playing minecraft. Normally a GPU have its own ram to store information used while rendering. Minecraft should theoretically send its rendering to the GPU and free up your computer RAM of the rendering tasks.
If you do not have a GPU and uses your CPU to do the rendering, this might pose an issue. If i recall correctly, playing minecraft on an APU takes about 3-4 GB of ram just for the client alone. As there is no dedicated ram for rendering, all rendering tasks is stored at the same location on the onboard RAM. This might also slow down tick rate as the CPU have to compensate for rendering as well.
I am abit incoherent at this last part as im not sure how to explain. You may clarify with me in the comments section.
EDIT: Adding some observations i have while running a SolitaryCraft Client with Optifine. It seems that somehow, it may be caused by Optifine or not, It have horrible garbage collection. ie. You might need to restart the client to flush your ram. If i keep my client running for like 4-5 hours, the ram usage is > 7GB on the client. Restarting the client lowers it to 4 GB again. I am using a x64 texture pack.