I know a lot of people were having an issue trying to get the option to "Invite To Household" to a ghost, but here are the setups that seemed to work for me.
TLDR:
You can start a new family, use one that you've been playing for awhile, or even move random families/friends from other lots into your family (best if you've already established a friendship so you won't have to take up too much time doing that). The Goal is to get your friendship level to "Best Friends' and that the green friendship bar is at 100%, anything less wasn't giving me the option to invite ghosts to household.
Current Family (Good if you've been doing a long-play and established relationships prior)
I used the same family I used for all of these achievements. I already knew I wanted to have a family "graveyard" in the backyard for when I would get around to this achievement so the setup was easy. Any time a family member died, I would put their urn in the backyard (which would transform into a tombstone). Make sure you "strengthen the connection to the physical world" on their urn/tombstone so that we have an opportunity to interact with ghosts and have them appear on the lot.
I currently have 13 tombstones, ironically, and so the ghosts would show up after midnight. Since they were family members I've interacted and had a friendship with before, I just had my main character interact with one of his deceased ancestors until they were good friends and then, until they were best friends. Now I was getting worried because I figured since they were "best friends" I would have the option to invite them, but it wasn't until their Happy/friendship bar was all the way 100% green for me to finally get the option to do so. You may not see it on the first set of FRIENDLY options so go through them slowly until you see "Invite To Household".
New Family (Good if you are just focused on this achievement)
Much like the previous section, the method will be similar. Just create a family of 8, make sure they are young adults or up. Make sure they are all related and pick a lot to start the game. Build up everyone's friendship and aim to get up to "best friend". Once that's reached, close the specific sims up in a small room with no door or access to anything and wait for them to kick the bucket. Once dead, "Strengthen the connection to the physical world" on their urn/tombstone and they should start showing up at midnight. Interact until the friendship bar is 100% green and the option to "Invite to Household" should show up under the FRIENDLY options.
Transferring Other Sims to Current Family (Good if you're doing a short-play or having issues with ghosts showing up after midnight)
Same method, but if you are struggling to get some ghosts to appear or the friendship is progressing slowly, go into the "Manage Worlds" option and click on your current family lot. Click the option to transfer sims to different households and you can then add other sims (preferably sims you've established a good friendship with) into your household. From there on, the process is the same, get up to "best friends", kill the sim via your method, and then "strengthen the connection to the physical world" on their urn/tombstone. Interact until the friendship bar is 100% green and the option to "Invite to Household" should show up under the FRIENDLY options.